Re: Deleteing a file using Unlink()
| From: | Paul Smith | Date: | Fri, 06 Jul 2001 18:42:01 +0000 |
| Subject: | Re: Deleteing a file using Unlink() | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8157@lists.php.net to get a copy of this message | ||
If you have the file still open or another process (such as another user) has the file open it will not delete it. Probably the best solution (if it's not critical that the file be deleted) is to just supress the errors by using the @ symbol like this:
@unlink("filename");
Ryan Marrs wrote:
Hrrrm, seems I can't get the unlink command to work, is there a better way to delete files in Win2k? Always errors out that it can't find the file. I'm assuming this is an NT Permissions issue, even though the files are set full control by the user IIS/PHP is running as. Another note, these files were written to the drive using PHP, so I don't understand why it's having issues removing them. Any suggestions on the most "stable" or "secure" way to do this? Ryan-- DoStuff Online Classrooms http://www.dostuff.net -- Paul Smith psmith@dostuff.net http://www.dostuff.net