note 46968 deleted from function.register-shutdown-function by betz
| From: | betz@php.net | Date: | Fri, 26 Nov 2004 20:35:56 +0000 |
| Subject: | note 46968 deleted from function.register-shutdown-function by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81077@lists.php.net to get a copy of this message | ||
Note Submitter: dev at kiwicore dot org
----
Note for the staff: could you delete my comment below, and this line?
When using apache, the working directory of the callback function will be set to the drive's
root directory. To get the working directory back to the location of the called php file, just
include this at the top of your register_shutdown_function callback function:
<?php
$dbits = explode('/',$_SERVER['SCRIPT_FILENAME']);
array_pop($dbits);
chdir(implode('/',$dbits).'/');
?>