I being meaning to ask this question for a long time
Let say I have the following project
phpprj1
----file1.php
----file2.php
----mylib
-------lib1.php
-------lib2.php
----admin_folder
-------admin1.php
-------admin2.php
I dont want to set mylib folder in php.ini
in file1.php I use require_once 'mylib/lib1.php';
but in admin1.php I have to use require_once '../mylib/lib1.php';
Is there a better way to do this?
Thank you.
library directory path question[Solved]
Moderator: General Moderators
library directory path question[Solved]
Last edited by yacahuma on Tue Dec 18, 2007 7:34 pm, edited 1 time in total.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
set_include_path() and the use of PATH_SEPARATOR, and get_include_path().