note 27496 added to function.is-writable

From: Date: Sun, 08 Dec 2002 19:47:45 +0000
Subject: note 27496 added to function.is-writable
Groups: php.notes 
Request: Send a blank email to php-notes+get-40530@lists.php.net to get a copy of this message
A usefull way to stop the writing of a txt file if you forgott to CHMOD it... <?php $txt = "file.txt"; if (!is_writeable($txt)){ return "You forgot to CHMOD $txt"; }else{ $open = @fopen ($txt, "w"); $write = fwrite("Blah"); } ?> -- http://www.php.net/manual/en/function.is-writable.php http://master.php.net/manage/user-notes.php?action=edit+27496 http://master.php.net/manage/user-notes.php?action=delete+27496 http://master.php.net/manage/user-notes.php?action=reject+27496

« previous php.notes (#40530) next »