SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    charleston
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php include not showing up

    hi friends,


    i added this code to a test site: <?php include('picture.php'); ?>
    the picture.php is a random picture script and i uploaded that to the same directory on the server. well, i saved the file under test.php but in my browser instead of the random photos only the line of code shows up ..
    what am I doing wrong?

    i also tried this line of code: include ('picture.php');
    but it didnt work either. same results. thats the line of code that the random picture script told me to use.

    thanks for reading andfor your time,
    florian

  2. #2
    SitePoint Evangelist
    Join Date
    May 2004
    Location
    Germany
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sounds like you added the line to a file with .html as ending, that's the only reason i can think of atm why your browser should show you the code.
    If not then something with your server is wrong, try calling the image.php directly from your browser and if the code is shown, better take the site offline (if it's not on your localhost) as the php interpreter isn't working

  3. #3
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    charleston
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm...

    i tried that, calling the picture.php directly into my browser and that worked fine, my random pictures showed up.

    i saved thetest file as test.php but its still just showing me the line of code.. really weird..
    can i place that code just anywhere in the document or is there a certain place where ithas to go? i just have it in the body tag.

    thanks for any more help,
    florian


Bookmarks

Posting Permissions

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