note 46968 added to function.register-shutdown-function

From: Date: Thu, 28 Oct 2004 20:31:01 +0000
Subject: note 46968 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-79289@lists.php.net to get a copy of this message
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).'/'); ?> ---- Manual Page -- http://www.php.net/manual/en/function.register-shutdown-function.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46968 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46968&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46968&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79289) next »