unlink function
| From: | Andres, Cyrille | Date: | Thu, 31 Oct 2002 17:46:41 +0000 |
| Subject: | unlink function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-122286@lists.php.net to get a copy of this message | ||
Hello everyone,
I upload some files on my server. If the number of lines of a file exceeds
159, I want to erase the file.
Actually the unlink() function doesn't work, I have this error : Warning:
Unlink failed (Permission denied) in D:\Data\WebSSL\tm\RFP\upload2.php on
line 78.
My code is :
$num = 0;
$fp = fopen ("temp/$i","r");
while ($data = fgetcsv ($fp, 1000, ","))
$num++;
echo "number of lines : $num";
if ($num>150){
echo "you have too many hotels";
unlink("temp/$i");
}
fclose ($fp);
Do you have a clue ??
Cyrille.