Problems with images -- newbee

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Newbee

    #1

    Problems with images -- newbee

    Hi !
    Let's say that this is the folder on the server:
    /web/firstDir/secondDir/images/image.gif
    where i have stored my pictures. I have tryed with apsolute and relative
    paths but i can't display images....

    If i right click on the image the whole path is displayed on this way:
    http://www.test.com/Dir1/Dir2/Dir3/w...ages/image.gif

    Should i define global variables(?) or how to solve this....

    thanx in advance



  • Andy Hassall

    #2
    Re: Problems with images -- newbee

    On Sat, 12 Feb 2005 15:57:09 +0100, "Newbee" <phpAK@gtxmail. com> wrote:
    [color=blue]
    >Let's say that this is the folder on the server:
    >/web/firstDir/secondDir/images/image.gif
    >where i have stored my pictures. I have tryed with apsolute and relative
    >paths but i can't display images....
    >
    >If i right click on the image the whole path is displayed on this way:
    >http://www.test.com/Dir1/Dir2/Dir3/w...ages/image.gif
    >
    >Should i define global variables(?) or how to solve this....[/color]

    Looks like you're probably missing a leading slash, or doing something else
    wrong, hard to tell without some code.

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Newbee

      #3
      Re: Problems with images -- newbee

      Looks like you're probably missing a leading slash, or doing something else
      wrong, hard to tell without some code.
      ****

      This is the code part for the image ( this is document_root version):
      <?php
      print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
      "/web/firstDir/secondDir/images/image.gif" );
      ?>

      but i have tryed with

      <?php
      print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
      "/firstDir/secondDir/images/image.gif" );
      ?>

      but with no success...


      Comment

      • Jerry Stuckle

        #4
        Re: Problems with images -- newbee

        Newbee wrote:[color=blue]
        >
        > Looks like you're probably missing a leading slash, or doing something else
        > wrong, hard to tell without some code.
        > ****
        >
        > This is the code part for the image ( this is document_root version):
        > <?php
        > print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
        > "/web/firstDir/secondDir/images/image.gif" );
        > ?>
        >
        > but i have tryed with
        >
        > <?php
        > print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
        > "/firstDir/secondDir/images/image.gif" );
        > ?>
        >
        > but with no success...[/color]

        An img tag is already relative to the document root. Don't add it
        again.



        --

        To reply, delete the 'x' from my email
        Jerry Stuckle,
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        Member of Independent Computer Consultants Association - www.icca.org

        Comment

        Working...