Hi ! I am facing a problem with "how to determine read only file" under windows ?? that is, I want to make use of PHP to know the file I opened is read only or not... (Under Windows 98)
Well, I have never used PHP on a windows system, but I guess you could still use the fopen() to determine if the file is read only.
$fp = @fopen("file", "a"); if (!$fp) { // file is read only } else { fclose($fp); // file is writable }
Why not just use the function that PHP Provides?
bool is_writable (string filename);
-Steven