JSHINER Posted May 1, 2008 Share Posted May 1, 2008 With this code: mkdir('files/' . $_POST['id'] . '/attachments/', 0777); I get the error: Warning: mkdir() [function.mkdir]: No such file or directory in /home/... Any ideas why? When I just do mkdir('files/' . $_POST['id'], 0777); it works fine. Link to comment https://forums.phpfreaks.com/topic/103742-solved-quick-mkdir-question/ Share on other sites More sharing options...
rhodesa Posted May 1, 2008 Share Posted May 1, 2008 probably because 'files/' . $_POST['id'] doesn't exist. add a true to the end of the arguments and it will recursively create the directories needed: mkdir('files/' . $_POST['id'] . '/attachments/', 0777, true); Link to comment https://forums.phpfreaks.com/topic/103742-solved-quick-mkdir-question/#findComment-531159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.