note 44344 added to function.fopen
| From: | Firetech at rn2 dot php dot net | Date: | Wed, 21 Jul 2004 16:26:21 +0000 |
| Subject: | note 44344 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73827@lists.php.net to get a copy of this message | ||
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";
};
?>
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44344
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44344&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44344&report=yes
Search -- http://master.php.net/manage/user-notes.php