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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php