herghost Posted January 11, 2012 Share Posted January 11, 2012 Im simply having a problem with structuring a directory structure for mkdir mkdir("saves/".$worldname."/".$playername, 0777); The middle "/" is causing issues, if I take it out I have no problem in creating a folder name saves/worldnameplayername/ just want to add playername as a sub-dir. I have tried every combination I can think of to get it to accept the divider :'( Any help? Link to comment https://forums.phpfreaks.com/topic/254821-simple-structure-problem-i-think/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 11, 2012 Share Posted January 11, 2012 The parent-folder - saves/".$worldname must exist before you can add a child-folder inside of it. Link to comment https://forums.phpfreaks.com/topic/254821-simple-structure-problem-i-think/#findComment-1306610 Share on other sites More sharing options...
herghost Posted January 11, 2012 Author Share Posted January 11, 2012 Thanks This throws up a warning but does the job mkdir("saves/".$playername, 0777); mkdir("saves/".$playername."/".$worldname."", 0777); Should I somehow be moving into the saves/playername dir before creating the worldname dir? Link to comment https://forums.phpfreaks.com/topic/254821-simple-structure-problem-i-think/#findComment-1306613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.