note 47827 rejected from function.is-writable by sean

From: Date: Tue, 14 Dec 2004 05:47:55 +0000
Subject: note 47827 rejected from function.is-writable by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81776@lists.php.net to get a copy of this message
Note Submitter: Brian R ---- Please delete the last two; here's the dollar sign in the right place. function read_only ($path) { if (preg_match ("/^([A-Za-z]:)\\\\?$/", $path, $match)) { echo $match[1]; if ($writable = @fopen ($match[1] . ".writetest", 'w')) { fclose ($writable); unlink ($match[1] . ".writetest"); } } else { $writable = is_writable ($path); } return !$writable; }

« previous php.notes (#81776) next »