note 47823 deleted from function.is-writable by sean

From: Date: Tue, 14 Dec 2004 05:47:50 +0000
Subject: note 47823 deleted from function.is-writable by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81775@lists.php.net to get a copy of this message
Note Submitter: Brian R ---- Left out a critical dollar sign in the function I posted earlier! 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 (#81775) next »