note 44344 deleted from function.fopen by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 21 Jul 2004 16:38:10 +0000 |
| Subject: | note 44344 deleted from function.fopen by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73828@lists.php.net to get a copy of this message | ||
Note Submitter: Firetech
----
To check if a file is in use (Windows), for example if an exe-file is running, you can do the
following:
<?php
@$inuse = fopen('c:\programtocheck.exe','ab');
if ($inuse) {
print "file in use";
fclose($inuse);
} else {
print "file not in use";
};
?>