php3-list | 199903
Date: 03/31/99
- Next message: Keith V.: "[PHP3] checking usernames and paswords with mysql"
- Previous message: Brian S. Craigie: "[PHP3] OOPS!"
- In reply to: James Coates: "Re: [PHP3] is_writeable"
- Next in thread: James Coates: "Re: [PHP3] is_writeable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>I know about is-writeable, but it will only tell me if a file is writeable
>if it exists before-hand. I'd like to find out if a file is writeable
>without it existing; ie confirm that a directory will allow me to write
>there before I try and create the file.
What about:
<?
function myown_is_writeable($filename) {
if (file_exists($filename))
return is_writeable($filename);
else {
@$fp = fopen($filename,"w");
if ($fp) {
fclose($fp);
unlink($filename);
return true;
}
else
return false;
}
}
?>
Regards
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Keith V.: "[PHP3] checking usernames and paswords with mysql"
- Previous message: Brian S. Craigie: "[PHP3] OOPS!"
- In reply to: James Coates: "Re: [PHP3] is_writeable"
- Next in thread: James Coates: "Re: [PHP3] is_writeable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

