#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    1
    Rep Power
    0
    Does anyone knows how to use a relative path for the file included with require???
    This does not works:

    require("../session/session.php");


    Thanks a lot!!!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    I use relative paths everywhere and they look exactly like what you typed...

    require("../Include/AdminGlobals.php3");

    So:
    1) On lots of servers and operating systems, the paths are case sensitive.
    2) .. goes up on directory
    3) If you are including a file within another include, you need to specify the location of the second include with regards to the original file... e.i. the file in the url.

Similar Threads

  1. URL Rewrite in Tomcat
    By stoli_whisky in forum Java Help
    Replies: 20
    Last Post: May 3rd, 2004, 10:22 AM
  2. File checking on a relative path
    By rlhartness in forum Perl Programming
    Replies: 7
    Last Post: February 10th, 2004, 03:10 PM
  3. Problem in resolving relative path in tomcat 4.0.1
    By mamtakansal in forum Java Help
    Replies: 0
    Last Post: October 28th, 2003, 12:46 PM
  4. Path relative to site root
    By Oddish in forum PHP Development
    Replies: 15
    Last Post: September 27th, 2003, 01:15 PM
  5. problem with relative paths
    By Wizard2003 in forum XML Programming
    Replies: 4
    Last Post: August 26th, 2003, 12:43 AM

IMN logo majestic logo threadwatch logo seochat tools logo