note 1231 deleted from function.virtual by nlopess
| From: | nlopess@php.net | Date: | Fri, 16 Jan 2004 19:54:47 +0000 |
| Subject: | note 1231 deleted from function.virtual by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63696@lists.php.net to get a copy of this message | ||
Note Submitter: tomwk@mail.utexas.edu
----
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 );