require_once problems
Posted: Tue Sep 11, 2007 6:19 pm
in my code I have:
file_array.php exists in my root web directory, but the script I am running is in a directory that resides in the web directory. If I run the script as is, I get the following messages:
C:\xampp\htdocs is my root web directory and I have checked, and file_array.php does exist in that directory. The script only works if I use:
OR
I thought that by having the directory C:\xampp\htdocs in the include_path in my php.ini I didn't need to fully qualify the file location. Did I miss something in the php doc?
Code: Select all
require_once("file_array.php");Code: Select all
Warning: require_once(file_array.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\report_view.php on line 5
Fatal error: require_once() [function.require]: Failed opening required 'file_array.php' (include_path='.;C:\xampp\php\pear\; C:\xampp\htdocs\') in C:\xampp\htdocs\test\report_view.php on line 5Code: Select all
require_once("C:\\xampp\\htdocs\\file_array.php");Code: Select all
require_once("../file_array.php");