Why doesn't show image?

Discussion in 'PHP' started by piropeator, Aug 24, 2009.

  1. #1
    I have one image in this path: /images/logos/logo.jpg

    I want to show this logo but does not work. Why?

    <?php
    define('APP_BASEDIR', dirname(__FILE__));
    define('HTTP_SERVER', 'http://localhost');
    //
    define('DIR_IMAGES', 'images/logos/');
    echo DIR_IMAGES.'logo.jpg';
    ?>

    What is my mistake ?:confused:
     
    piropeator, Aug 24, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try

    echo "<img alt='my_image_description' src='" . DIR_IMAGES . "logo.jpg' />";
    PHP:
     
    szalinski, Aug 24, 2009 IP
  3. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The domain localhost isn't usable on the net. Is that what you're using? That just points back to the visitor's computer.
     
    theapparatus, Aug 24, 2009 IP
  4. piropeator

    piropeator Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #4
    OPSSS!!

    My quote was wrong....
    thanks.
     
    piropeator, Aug 24, 2009 IP