Re: i need help help with include

From: Date: Wed, 07 Jan 2004 14:18:19 +0000
Subject: Re: i need help help with include
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173966@lists.php.net to get a copy of this message
Hello, Wednesday, January 7, 2004, 2:13:03 PM, you wrote: P> now i need to include my function file out of the root P> root/dir/funtionfile P> How do i do this? P> I cannot create a htacess file on this server nor set my include path. Err.. include("/root/dir/functionfile.php"); :) You could store the root directory in a variable or something to make life a bit easier for yourself: unset($basedir); $basedir = "/root/dir"; include("$basedir/file1.php"); include("$basedir/deeper_directory/file2.php"); etc Or you could use a constant to do the same thing, but unsetting the variable at the start protects it from over-writing via passthru data. -- Best regards, Richard mailto:rich@launchcode.co.uk

« previous php.general (#173966) next »