Re: unlink?
| From: | Norbert Gr�ttner | Date: | Thu, 03 Apr 2003 15:58:57 +0000 |
| Subject: | Re: unlink? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19271@lists.php.net to get a copy of this message | ||
Paul,
you have to make sure, that the file you are trying to delete via unlink is
not currently in use by you application:
Example which WILL NOT WORK
$array = File("filename");
Unlink ("filename");
Another one NOT WORKING
$fh = fopen("filename");
$data = fgets($fh);
unlink("filename"");
But this one should work
$fh = fopen("filename");
$data = fgets($fh);
fclose($fh);
unlink("filename");
Regards
Norbert
"Paul Dymecki" <pdymecki@hotmail.com> schrieb im Newsbeitrag
news:F167jfUKWTa9tfmKsX00000213f@hotmail.com...
> Hello,
> I was wondering if anyone knows how to delete a file from the
> filesystem? I've been trying unlink but it doesn't seem to be working as
> expected. Do spaces in the file path have to be compensated for or
> something?
> thx for any help,
> Paul
>
>
>
>
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>