Re: php includes

From: Date: Tue, 13 Jan 2004 22:26:36 +0000
Subject: Re: php includes
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32377@lists.php.net to get a copy of this message
Mayo wrote:
I'm new to php (I've been in the CF world the last few years) and have a basic question regarding includes: On my dev box (a fancy term for laptop) I have the following include: <?php include ("navTop.php"); ?> This doesn't work on the client's site. There I have to use: <?php include ("/home/sites/www.abc.com/web/navTop.php"); ?> I can't use relative links. So is there any trick that people have so that I don't have to touch each of my files before sending them up? gil
Please do not write a new post by replying to an old post and changing its subject and content. It screws up threading in the better e-mail clients (mutt, Thunderird, etc.) as it keeps the thread's headers. It looks like your client doesn't have "." in their include_path in the php.ini. They could change their php.ino to have "." in it and fix things quick and simple. Or, you can use ini_set() to set the value yourself. You'd probably want to do something like this in your files: ini_set('include_path', '.:'.ini_get('include_path')); -- paperCrane <Justin Patrin> -- Question Everything, Reject Nothing

« previous php.db (#32377) next »