I wanted to experiment with creating directories titled with the date and current time. I know I can use the php time() function, but that is hard for me to read. Why can't I create a directory named 06-11-2014 11:37:04 or so? The php mkdir function is giving me an invalid argument when I try to use this format.
php code
<?php
$newdate = date("m-d-Y H:i:s");
mkdir($newdate, 0755, true);
?>
The colons in the date are messing it up. Your best bet is to use a format like this:
$newdate = date("m-d-Y H_i_s");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With