javascript - How to delete file in a dir using php script -
i want delete image inside profile_images folder. tried
unlink(base_url() . "_profile_images/912aea1dd8144e07894f788978b917d3.jpg");
and error occured
a php error encountered
severity: warning
message: unlink() [function.unlink]: http not allow unlinking filename: controllers/controller.php line number: 100
i used codeigniter implement action. there way delete file?
you attempting delete url string, should php full path , filename file able unlink it.
not sure path is, php has several functions should full directory path file.
$_server['document_root']; // php's document root, it's start.
Comments
Post a Comment