include path
Posted:
16. January 2009 04:03
by Ticebain
Hi, wondering if you all know how to change the include, it seems to default to the pear directory, and I cant get it to change. I would prefer that there is no predefined include path and to use all relative paths, I have a tendency to use includes from all over, some have html in them, some have php, some have php functions, some have arrays, all sorts of stuff
Thanks
//I have the windows version of xampp
Re: include path
Posted:
16. January 2009 04:09
by Izzy
The php configuration file in XAMPP is here,
xampp\apache\bin\php.ini if that is what you are wanting.
- Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;C:\xampp\php\pear\"
Perhaps you can
add to that line.
Remember to save the file if you make any changes and restart Apache - make a backup or copy of the php.ini first.
Re: include path
Posted:
16. January 2009 04:23
by Ticebain
ahh perhaps restarting apache was the problem, because I found that and changed it and it broke the whole include process when i saved it and tried to run a script with an include... but being limited in my includes to one directory is a problem
I am working on mulitple projects and not being able to put a line of code in like
include('footer.html'); //footer.html being in the same folder as the document calling it
because that actually routes to
C:\xampp\php\pear\footer.html
is a serious hinderance...
thanks for the reply izzy, does that make more sense of my problem?