include_path problems from php.ini
Posted: Mon Feb 14, 2011 8:11 am
Hi. I'm trying to set-up my include_path from php.ini but they don't seem to work. I have tried the following:
In my php file, I just type
Where initialize.php is a file located at C:\xampp\htdocs\gradegrid\boilerplate\php.
But all I get are errors particularly
Now, I have a clue why my first attempt (at php.ini) didn't work but I cannot understand what's wrong with the second one. I managed to make it work though; I put my boilerplate folder at PEAR and then included "boilerplate/php/initialize.php". Any thoughts?
Code: Select all
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;C:\xampp\htdocs\gradegrid\boilerplate\php"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".;C:\xampp\php\PEAR"
Code: Select all
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
; include_path = ".;C:\xampp\htdocs\gradegrid\boilerplate\php" <- now commented out
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".;C:\xampp\php\PEAR;C:\xampp\htdocs\gradegrid\boilerplate\php"
Code: Select all
include("initialize.php");But all I get are errors particularly
on both attempts.No such file or directory in C:\xampp\htdocs\gradegrid\index.php on line 3
Failed opening 'initialize.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gradegrid\index.php on line 3
Now, I have a clue why my first attempt (at php.ini) didn't work but I cannot understand what's wrong with the second one. I managed to make it work though; I put my boilerplate folder at PEAR and then included "boilerplate/php/initialize.php". Any thoughts?