SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Columbus, OH
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Defining an image path?

    Ok, so I know that through your php.ini or htaccess file you can define your includes folder.. thus only having to call a file within it with

    include("filename.php" );

    My question is : does anyone know of a way to set this for your images, so that no matter how deep your file is buried, you're still only asking for the image name itself, and not ../../../../../images/filename.gif ??

    Thanks

  2. #2
    SitePoint Member
    Join Date
    Apr 2003
    Location
    France
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure to understand your question...
    Dead you mean in the html code ? ( <img src=/imgs/image.gif> instead of <img src=.../.../.../...//image.gif> )
    ??

    if it is you question, just create an Alias in you httpd.conf
    ie:
    Alias /imgs/ "/full/path/to/your/images/"
    Imagination is more important than knowledge. A. Einstein

    Very Secure wwwboard script:
    Demo - Download

  3. #3
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Columbus, OH
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, thats what I was lookin for. Can you go a lil more in depth with the solution?

  4. #4
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd have a problem I think if the directory structure changed though ?

    What exactly is the images your about to use - what's their purpose I should really be asking ?

    Is there no way to create the pathname dynamically through script - you could look at the root folder and read in it's contents (ie folders - not files) and create a pathname from that ?

  5. #5
    SitePoint Member
    Join Date
    Apr 2003
    Location
    France
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This link probably will help you:
    http://httpd.apache.org/docs/mod/mod_alias.html#alias
    Imagination is more important than knowledge. A. Einstein

    Very Secure wwwboard script:
    Demo - Download


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
  •