Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2009
    Location
    Cape Town
    Posts
    83
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Pictures not imported with PHP include

    Hi everyone,

    I use local Wamp Server on WinXP to test my html pages and use php includes. My problem is that none of the jpg's or gif's are imported but everything else is.

    Any suggestions? Here is the code that is embedded in the php page that is being included:

    <p class="maintext"><span class="h2">Your Shopping Cart</span><span class="h1"><img src="../general/cart.gif" width="15" height="11" alt="cart"></span></p>
    <p class="maintext">Number of items in your Shopping Cart: </p>
    <p class="maintext"><a href="shoppingcart.html">View Shopping Cart</a></a></p>
    <p><img src="../general/translogo_1.jpg" width="180" height="243" /></p>


    Anita,
    Cape Town.
    Last edited by Anita2105; 10-15-2009 at 08:38 PM.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,469
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Gotta be a path problem:
    ../general/translogo_1.jpg

    I'm guessing the path should be ./ not ../
    But of course, we can't see your website, so there's no way for us to tell.

    What are we supposed to do without being able to see your site?

  • #3
    New Coder
    Join Date
    Apr 2009
    Location
    Cape Town
    Posts
    83
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Hi mlseim,

    What a silly problem - and easy to solve! Dreamweaver by default seems to put 2 dots ../ before the location url. I just removed one dot and everything worked 100%

    Thanks very much!

    Anita.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •