Unlink function isn't broken, you just don't have the correct
rights set on the files, so PHP can't erase them, fix the permissions
and that will take care of that error.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-31 at 12:46, Andres, Cyrille wrote:
> 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
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to