note 30119 deleted from function.register-shutdown-function by didou
| From: | didou@php.net | Date: | Thu, 29 May 2003 22:53:15 +0000 |
| Subject: | note 30119 deleted from function.register-shutdown-function by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49379@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Sorry for my post on 28-Feb-2003 12:36. It is false.
There is a strange behaver in Apache+PHP with function register_shutdown_function(). That is when
PHP working in CGI mode, all thing seems fine, but when you run PHP as Apache Module, Apache change
base dir to "\" . Maybe my explain is wrong, anyway, just replace all relative dirctory
with absolute directory which in your shutdown function and then all should be ok.
Follow is fixed code from my last post:
<?php
function fShutdown(){
$fp=fopen(realpath("aaa.log")."/aaa.log","a+b");
fclose($fp);
}
register_shutdown_function('fShutdown');
echo "bla bla bla....";
echo "blu blu bla....";
?>