note 30119 added to function.register-shutdown-function

From: Date: Fri, 07 Mar 2003 00:23:59 +0000
Subject: note 30119 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-44959@lists.php.net to get a copy of this message
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...."; ?> -- http://www.php.net/manual/en/function.register-shutdown-function.php http://master.php.net/manage/user-notes.php?action=edit+30119 http://master.php.net/manage/user-notes.php?action=delete+30119 http://master.php.net/manage/user-notes.php?action=reject+30119

« previous php.notes (#44959) next »