ChrisMartino Posted September 27, 2009 Share Posted September 27, 2009 Hey there, Thanks for taking the time to read, I'm a beginner PHP Coder, I would like to know how to create a PHP script that every time you run it, It will create a filename with +1 number each time For example: 1st Time running the script: Creates directory "/home/servers/server100" 2nd Time running the script: Creates directory "/home/servers/server101" 3rd Time running the script: Creates directory "/home/servers/server102" 4th Time running the script: Creates directory "/home/servers/server103" And it keeps adding +1 to the file name like that each time, How could i do this?, Thats for the help, P.S i would need to execute this VIA SSH2. Quote Link to comment https://forums.phpfreaks.com/topic/175676-help-with-file/ Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 Sorry but we are here to help freely, not create the whole project, we got a place for that on here the freelance part of the forum....... sorry...... Quote Link to comment https://forums.phpfreaks.com/topic/175676-help-with-file/#findComment-925741 Share on other sites More sharing options...
Zane Posted September 27, 2009 Share Posted September 27, 2009 pretty much your entire solution will revolve around this function http://us2.php.net/file_exists you may even possibly find a copy and paste answer in the comments area EDIT: If not that function, then this one will be it http://us2.php.net/manual/en/function.is-dir.php Quote Link to comment https://forums.phpfreaks.com/topic/175676-help-with-file/#findComment-925771 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.