Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member Fireproofgfx's Avatar
    Join Date
    Apr 2012
    Location
    Washington
    Posts
    840
    Member #
    31498
    Liked
    171 times

    Php Include issues

    I am having issues with my logo not showing up properly when using Include across multiple directories. For example.

    Folder Structure: Root - Resources - Include
    This is the code I use for the main pages like Home, About, FAQ, Contact, etc. and this works properly
    <?php include('resources/include/navigation.php'); ?>

    The Breeder that I am building this site for has multiple dog litters so I am putting all of the litters in their own Litter Folder to help keep the root clean

    Folder Structure:
    Root - Litter - Captain_beauty_litter
    Included in this is a Logo and Menu. The menu shows up properly but the Image does not.
    <?php include('../../resources/include/navigation.php'); ?>

    I have been researching how to fix this but have been unsuccessful as my PHP knowledge is very limited as you can see. But I saw some things on specifying a ROOT DIRECTORY with PHP but couldn't figure it out.

    Any help would be greatly appreciated... THANK YOU!

  2.  

  3. #2
    Senior Member sarahswansea's Avatar
    Join Date
    Oct 2015
    Location
    Swansea, UK
    Posts
    150
    Member #
    52184
    Liked
    64 times
    If it's just the image, is it maybe just the HTML e.g. the url to the image that's the problem?

    The base HTML element is one solution, but I'd recommend instead updating the image link.

    e.g. instead of "relative/path/to/image.png" something like "/absolute/path/to/image.png" which will be relative to the base domain

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,679
    Member #
    5580
    Liked
    714 times
    @Fireproof ...

    PM me privately if you want me to look at it. I would need FTP access. It's hard to tell what is happening without seeing all of the directories and files. You can create a temporary FTP login if you want.


  5. #4
    Senior Member Fireproofgfx's Avatar
    Join Date
    Apr 2012
    Location
    Washington
    Posts
    840
    Member #
    31498
    Liked
    171 times
    mlseim that would be so greatly appreciated, I hit these bumps in the road and get stuck and I get pretty discouraged to say the least.I will PM you the info. Thank you for taking a look.

  6. #5
    Senior Member Fireproofgfx's Avatar
    Join Date
    Apr 2012
    Location
    Washington
    Posts
    840
    Member #
    31498
    Liked
    171 times
    Thank you Sarah for the feedback. I will look into this as well and see if it will help

  7. #6
    Senior Member Fireproofgfx's Avatar
    Join Date
    Apr 2012
    Location
    Washington
    Posts
    840
    Member #
    31498
    Liked
    171 times
    Hey Mlseim, I sent you a PM but I am not sure if actually went through, while it was sending the message it took a while before the page changed and so I checked to see if it was in my Sent PM's and there wasn't anything there so I tried a second time and the same thing happened so I am not sure if it did or not. If not we can contact through Email if need be.

  8. #7
    Junior Member
    Join Date
    Dec 2018
    Location
    Malaysia
    Posts
    3
    Member #
    60224
    The image should link to absolute path. or you can use exactly URL path some tings like http://yourdomain.com/images/xxx.jpg


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:27 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com