Okay, so essentially Ilm looking to see if there is a way to create folder in another folder on a web server using PHP. So for example I have domain.com/script/testdir so I put a script inside of domain.com/script folder called lets say create_dir.php. Every time I access this webpage I want it to create testfolder and then testfolder1 and then testfolder2 every time I refresh and access that same page inside of the testdir folder so after 10 refreshes on this website I would be able to cd in testdir and see testfolder to testfolder9 meaning 10 different folder. I can’t seem to figure out how to do this. I want to be create files in there eventually but is there a way I can set this up? any help would be appreciate. Ive tried so many things and I give up. If someone can just give me some help or show me the exact code on how to make this work as I’m am absolutely clueless and I give up. I REALLY appreciate the help guys, you all rock. Keep in mind I DON’T want it to create dir1-10 in one but rather each time T access the page so if i did it 10,000,000 times it would create 10,000,000 folders.
Or if there is even a way to set the name of the folder as the current date and time.
This should allow you to make the folders in the way you want. Just give it the path of
/domain.com/script/testdir/and it will make the sub-directories for you using Year, Month, Day, Hour, Minute, Second & Microseconds. The microseconds is in there just in case you run two tests at the same time, it will not make two folders with the same name (that obviously would not work.) so it’s there to prevent such collisions.If you really wanted too, you could also change the date argument so do forward slashes. What this will do is, make sub directories for the date, looking something like this.
domain.com/script/testdir/2013/01/22/20/15/30/9876543