Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: PHP Create Directory by date
03-28-2009, 02:36 PM #1
- Join Date
- Jul 2006
- Thanked 0 Times in 0 Posts
PHP Create Directory by date
I am trying to create directory by date. It is something like creating a flat file database. What I am trying to do is to create a new topic. In my root directory I want to create (if the date is 2009.03.27.23.45.12 - YYYY.MM.DD.HH.MM.SS) then I want to create a file 2009_03_27_23_45_12.txt in 2009>03>27 directory. Now I can create a file with a php - I do have some experience with PHP but what happens if I try to create another file on the same date. I dont have to create the directories (hierarchy) again - i just need to create the file only after checking if the directories exist. I am looking for the best practice for doing this. I am looking for an example code. Please help.
Last edited by neo_philiac; 03-28-2009 at 04:05 PM.
03-28-2009, 02:52 PM #2
- Join Date
- Mar 2007
- Thanked 2,223 Times in 2,210 Posts
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)