note 1231 modified in virtual by ronabop
| From: | ronabop@php.net | Date: | Fri, 24 Nov 2000 05:50:45 +0000 |
| Subject: | note 1231 modified in virtual by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8045@lists.php.net to get a copy of this message | ||
It seems that virtual changes the current directory, so you will have problems if you do a virtual(
"/someotherdir/file.shtml" ) then an include( "./myfile.php3" )
A workaround is:
$curDir = dirname( getenv( "SCRIPT_FILENAME" ) );
virtual ( "/someotherdir/file.shtml" );
chdir( $curDir );
http://www.php.net/manual/function.virtual.php