ballouta Posted May 29, 2009 Share Posted May 29, 2009 Hi i have this line of code: <?php unlink("/home/simwsim/public_html/mdaouk/one"); ?> when i run the php script, i get this warning and the directory still exisit. Warning: unlink(/home/simwsim/public_html/mdaouk/one) [function.unlink]: Is a directory in /home/simwsim/public_html/CMS/members/unlink2.php on line 15 Note that the directory one is empty, and i asked the hosting server about the correct chmod of the directory, they said it sould be 755, I changed the directory properties mdaouk and its contents(one) to 755 but still the same. where is my mistake? Thank you Link to comment https://forums.phpfreaks.com/topic/160161-solved-unlink-problem/ Share on other sites More sharing options...
akitchin Posted May 29, 2009 Share Posted May 29, 2009 unlink() is for files. if you want to remove a directory, use rmdir(). Link to comment https://forums.phpfreaks.com/topic/160161-solved-unlink-problem/#findComment-845022 Share on other sites More sharing options...
ballouta Posted May 29, 2009 Author Share Posted May 29, 2009 thanks! Link to comment https://forums.phpfreaks.com/topic/160161-solved-unlink-problem/#findComment-845034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.