eldan88 Posted June 13, 2013 Share Posted June 13, 2013 Hey, I am trying to unlink all files in 2 seperate directories using the array_map function. On one of the directories it works, and the second directory it does not unlink any of the files. I have checked the path and permissions and everything looks the way it should be. Is there any way where I can debug the code to see why it isn't unlinking. Below is the code I am using array_map("unlink", glob($diretory/*.()) Link to comment https://forums.phpfreaks.com/topic/279100-need-help-unlinking-files/ Share on other sites More sharing options...
gizmola Posted June 13, 2013 Share Posted June 13, 2013 What is your real code. That code would not even parse. The glob function requires a string parameter. I'd expect something like: array_map("unlink", glob("$diretory/*")); Link to comment https://forums.phpfreaks.com/topic/279100-need-help-unlinking-files/#findComment-1435679 Share on other sites More sharing options...
eldan88 Posted June 15, 2013 Author Share Posted June 15, 2013 What is your real code. That code would not even parse. The glob function requires a string parameter. I'd expect something like: array_map("unlink", glob("$diretory/*")); Nevermind! Has a small typo! Link to comment https://forums.phpfreaks.com/topic/279100-need-help-unlinking-files/#findComment-1436173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.