library directory path question[Solved]
Posted: Tue Dec 18, 2007 5:06 pm
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.
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.