when i used unlike function to delete file this error Occurs :

Warning: unlink() [function.unlink]: Permission denied in D:\xampp\htdocs\acc\admin\mag.php on line 18
what i can do?

Recommended Answers

All 9 Replies

Your web user on the server has no permission to access that file. So its not possible to delete file without full privilege.

very thanks
but how can i give permission to server?

is it your own server under your control or it is somewhere else.
Do you have telnet or ftp access?

my local server

linux or windows?

windows
i used xampp server
and veeeeeeeery thanks to you

on windows I dont think any problem should occur, Is the file opened, when u are trying to delete.

very thanks
my problem is:
i delete info from mysql befor i select dir of files
very thanks about u help to me

so your problem is solved or u are still cant trace it?
If you have opened file in any software or by fopen. then it may not allow you to delete on widows.

on linux you apache user must have permission to access the file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.