Forum Moderators: phranque

Message Too Old, No Replies

Include_path

Localhost configuration

         

tomda

7:19 am on Apr 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Include_path
************
My server is having an include_path function so that by typing include ("foo.txt"), it goes directly in the "www/include" directory to get the foo.txt file.

1/ What should change in Apache conf. to have the same in my localserver?

2/ What should I use if I want to include a file which is not in the www/include directory?

Tomda

tomda

12:25 pm on Apr 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just did some search and found that

1/ In php.ini file - just need to modify the include_path value

2/ It seems that the server first check for the include in the main include_path. If the file can not be found, it then looks for the file in the directory where you call the include.

a) include ("foo.txt") will look in the include_path.

b) include ("include/foo.txt") will look in the include folder in the directory where you call the include.

Finally, for those who need the include_path as a variable, you can use :
ini_get("include_path")
It works fine on my localhost, not sure it will work online.

Tomda