PDA

View Full Version : include_path problem



themanroom
07-02-2004, 12:20 PM
Hello,

I currently use a require_once and include file from my www directory with no issues. However, if I create new directories such as www/whatever, I can't get the require_once and include to grab back from the www directory.

I know the solution is probably some sort of include_path line on the top of each page but I can't get it to work. I don't have access to php.ini or any of the systems files. Any help would be appreciated.

Dan
TheManRoom.com

wildjokerdesign
07-02-2004, 06:39 PM
Are you using a relative path in your include and require? i.e if the file you want to include is in the www directory and the page that is calling it is in the www/whatever directory try -
include('./../thefile');
HTH

themanroom
08-04-2004, 01:00 PM
I've tried it all. Relative, full; you name it.

wildjokerdesign
08-04-2004, 01:51 PM
How come you don't have access to php.ini? It is pretty easy to get to in /ftp/usr/lib/php.ini

If you want to set the include path with in the script it self the you need to use ini_set(). Here is a link to a page that explains how to do it. http://www.sitepoint.com/blog-post-view.php?id=176388 You need to scroll down the page till you come to Script Configuration. The article gives some other usefull info that may be of use to you down the line.