dannybrazil Posted March 5, 2010 Share Posted March 5, 2010 Hello I have been trying for hours but cant do it... I have a site that users are allowed to upload photos and delete them if they want to the file path is saved as a FULL link the the file : http://www.mysite.com/lib/file.jpg now what I understood is that with this code : $file = $_POST['file']; if(unlink($file)) { mysql_query("UPDATE class SET $photo_number=NULL WHERE id=$id "); } but instead I get this message : Warning: unlink() [function.unlink]: http does not allow unlinking in /home/rgajsgjb/public_html/classimoveisrn/hebrew/delete_photo.php on line 32 Any help ? Link to comment https://forums.phpfreaks.com/topic/194233-unlink-function-not-working/ Share on other sites More sharing options...
TigerLV Posted March 5, 2010 Share Posted March 5, 2010 It could be related with permissions, try to change them ... chmod() ... http://php.net/manual/en/function.chmod.php Link to comment https://forums.phpfreaks.com/topic/194233-unlink-function-not-working/#findComment-1021880 Share on other sites More sharing options...
greatstar00 Posted March 5, 2010 Share Posted March 5, 2010 http://www.phpfreaks.com/forums/index.php?topic=240839.0 read here,it might help u Link to comment https://forums.phpfreaks.com/topic/194233-unlink-function-not-working/#findComment-1021909 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.