note 23813 deleted from ref.filesystem by spic
| From: | spic@php.net | Date: | Tue, 17 Sep 2002 09:02:45 +0000 |
| Subject: | note 23813 deleted from ref.filesystem by spic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36772@lists.php.net to get a copy of this message | ||
@lee:
touch() is one way, but if the file already exists, u will only modify its timestamp (at least
afaik, i may b mistaken). so one way is to check whether the file exists (file_exists()) or simpler,
in my opinion, try: $fd=fopen("foo.txt","w"); which creates an empty file or
empties the file if it exists and afterwards you use a fclose($fd); now u have an empty file, no
matter whether it already existed or not.....
cy.t