You can provide the full path:
require "/usr/local/share/apache/htdocs/deep/down/dir/a_specific_file";

You can alter include_path in php.ini to have
"/usr/local/share/apache/htdocs/deep/down/dir:./:/usr..." in it

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Rasmus Resen Amossen <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Tuesday, January 23, 2001 11:46 AM
Subject: [PHP] Filereference and require()


> I have a file, lets call it genericfile.php, containing a
>   require("a_specific_file");
>
> Now, I want to use (thats include) genericfile.php in many of my other
> .php-files in the WHOLE directorytree. The problem is that
> "a_specific_file" can't be found trough genericfile.php if this is
> included someplace other in the directory tree.
>
> How can I tell php not to make defaultpath to the toplevel require()
> funcion call?
>
> --
> Rasmus Resen Amossen | stud.mat.dat at the University of Copenhagen
> Jagtvej 120, -244    | http://www.math.ku.dk/muh
> 2200 Kbh. N          | http://w1.1444.telia.com/~u144400001
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to