1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

what php string to use for images please

Discussion in 'PHP' started by dragonies, Oct 5, 2005.

  1. #1
    Hi

    I have a problem on my site page to get images to show up.

    I am placing <?php include ?> tags for news pages and fiction pages to show on the page but the images do not display from the folders. There is just a white square emty image.

    how do I get the images to show up please? here is an example

    <head></head>
    <title></title>
    <body>
    <?php include ("news/index.php") ?>
    </body>
    </html>

    the text prints ok but not the image.

    the page has a .php extention not an html extention. The news section has smilies but they do not show but work ok when you click on the news main link outside of the homepage. I checked the config.php to see if there was a path to images but there isnt any.

    the news smilies work similar to the bullitin board where u click on the image and it places itself in the text box before you post it up.

    If you need to see what I mean here is the url if this is allowed?

    http://katesplace.mydragonateamazingnoodles.com

    have been racking my brain for ideas and tried a few things, but they did not work.

    many thanks
    Kate :D
     
    dragonies, Oct 5, 2005 IP
  2. norfstar

    norfstar Peon

    Messages:
    1,154
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi Kate :),

    I assume you're talking about the smilies. The HTML source of your page is calling:

    smilies/happy.gif

    which tells the browser to look for the image file at:

    http://katesplace.mydragonateamazingnoodles.com/smilies/happy.gif

    which comes up as a 404 file not found error.

    I would have imagined the PHP script your using had a variables or config file where the smilies directory is set incorrectly - but as you've said you have looked at that and there is no images directory variable. If this is the case, you may need to find that parts of the script where the smilies are echoed and change the path to the directory manually.

    Hope this helps!
     
    norfstar, Oct 5, 2005 IP
  3. dragonies

    dragonies Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Norfstar

    many thanks for replying :D

    yes it is done through an admin panel. The script is a php script and all the files folders are on the correct paths. I did think of that earlier and manage to change something the other day but can't remember how I did it.

    I can't put the news/index.php in the same directory as my subdomain folder, since the homepage is index.php already, so it has to come from inside another folder. If u see what I mean. The paths are correct for the folder /news/

    if I change the php variables in the news/index.php (and I dont know where, because I have only just learnt how to place include tags (1 weeks ago) and just a mere beginner in php :D ) I think it will through it out for the rest when you go into the link outside of the katesplace link. Hmmm hope u still with me so far lol.

    I think I will go with the path change idea in the admin panel and try that first as u suggested.

    I will let u know how it goes :D Hope that I have not confused you yet.

    regards Kate
     
    dragonies, Oct 5, 2005 IP