Hi
I am trying to delete a csv file using the unlink() function, but i keep getting a permission denied warning
Warning: unlink(UsedNOS200704191.CSV): Permission denied in E:\webroot\dev\file_test\index.php on line 416
My script basically reads email attachments and downloads the attachment file into the current directory of the running script. The data in the attachements is then read and stored into MySQL. Once i've finished reading this file, i need to delete it.
When i unlink excel files (.xls) everything is OK and this produces no errors/warning, however, when i try to unlink the (.csv) files. i get a permission denied warning.
The same script which creates the file (from email attachment) is doing the deleting (unlink() funtion), once the file has been read. So, therefore in terms of owning a directory or file and having access writes to that directory should not be a problem. as its the same script which created the file in the first place.
The open connection to the file is closed beofre i try to delete it, but this is not the issue.
Why am i able to unlink the excel files and not the csv files, its the same script that creates both file type, reads both file type and eventually (should) delete both file types.
Any help on this mater would be appretiated, as i'm tried everything without much success.
Thanks in advance