metaphist Posted July 9, 2008 Share Posted July 9, 2008 I'm trying to make a new directory in an existing one. I'm doing something like: mkdir(existingfolder/existingfolder/newfolder, 0755, true); However, this makes a whole new nested directory instead of putting "newfolder" within the existing folders. Do I have to navigate to the existing directories first or something? Link to comment https://forums.phpfreaks.com/topic/113983-mkdir-in-existing-directory/ Share on other sites More sharing options...
john-formby Posted July 9, 2008 Share Posted July 9, 2008 I do this on a couple of sites. Here is the code I use: $path = 'existingfolder/existingfolder/newfolder/'; mkdir($path,0777); chmod($path,0777); Link to comment https://forums.phpfreaks.com/topic/113983-mkdir-in-existing-directory/#findComment-585819 Share on other sites More sharing options...
metaphist Posted July 9, 2008 Author Share Posted July 9, 2008 Whoops! Turned out to be a typo on my part, so it was making a new one with the typo. Now I feel dumb Link to comment https://forums.phpfreaks.com/topic/113983-mkdir-in-existing-directory/#findComment-585832 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.