Re: <img> can't seem to find the file

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

    #1

    Re: <img> can't seem to find the file

    Puzzled wrote:
    echo '<img src="/usr/local/yaddayadda/filename.jpg" alt="not
    found">' ;
    >
    I hope I'll understand it in the right way.
    You browse your website http://www.example.com with a webbrowser. In the
    source of it is written by PHP
    <img src="/usr/local/yaddayadda/filename.jpg" alt="not found">

    So your brwoser is asking the webserver for


    But I think it will be not the correct path because it seems to be a
    complete unix-path starting from root. PHP will not deliver the picture it
    self but only the relative path to it. (or relative path according to your
    web root)


    Sven Reuter
    --


  • Sven Reuter

    #2
    Re: &lt;img&gt; can't seem to find the file

    Sven Reuter wrote:
    But I think it will be not the correct path because it seems to be a
    complete unix-path starting from root. PHP will not deliver the picture
    it self but only the relative path to it. (or relative path according to
    your web root)
    >
    =(or absolute path according to your web root)

    Sorry.


    Sven Reuter
    --


    Comment

    • jimp@specsol.spam.sux.com

      #3
      Re: &lt;img&gt; can't seem to find the file

      Puzzled <scratching.hea d@example.comwr ote:
      On Thu, 06 Nov 2008 21:36:16 +0100,
      "Sven Reuter" <newsgroup_11-08@sreuter.netw rote:
      >
      >>Puzzled wrote:
      >>
      >>echo '<img src="/usr/local/yaddayadda/filename.jpg" alt="not
      >>found">' ;
      >>>
      >>I hope I'll understand it in the right way.
      >>You browse your website http://www.example.com with a webbrowser. In the
      >>source of it is written by PHP
      >><img src="/usr/local/yaddayadda/filename.jpg" alt="not found">
      >>
      >>So your brwoser is asking the webserver for
      >>http://www.example.com/usr/local/yad...a/filename.jpg
      >>
      >>But I think it will be not the correct path because it seems to be a
      >>complete unix-path starting from root. PHP will not deliver the picture it
      >>self but only the relative path to it. (or relative path according to your
      >>web root)
      >>
      >>
      >>Sven Reuter
      >
      Tak så mycket! (Or recht schön Dank, depending on whether you're
      ethnically big-endian or little-endian :-)
      >
      I got confused because Apache will accept absolute paths for
      config instructions etc.
      Apache will accept absolute paths for just about anything IF you've
      configured it that way.

      The normal default is to not serve pages/images not under the root.


      --
      Jim Pennino

      Remove .spam.sux to reply.

      Comment

      Working...