note 58814 deleted from function.mkdir by sniper

From: Date: Sun, 15 Jan 2006 14:20:33 +0000
Subject: note 58814 deleted from function.mkdir by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101852@lists.php.net to get a copy of this message
Note Submitter: matt at mangoduck dot org ---- I have an account creation script that makes a directory soon before exiting. It doesn't make sense, but it seems that mkdir is executing asynchronously (perhaps only on the side of the server's filesystem) and is not allowed to complete before a header is sent and the script ends. Embedding mkdir in a conditional forces it to evaluate and wait for the returned boolean. <? if (mkdir('[path]', 0777)) { header('Location: [place]'); exit(); } else { [handling]; } ?>

« previous php.notes (#101852) next »