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/*.()) Quote Link to comment 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/*")); Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.