vendredi 2 octobre 2015

PHP mkdir not working as expected

I'm working on some PHP that'll create a folder every time a request is made to my server. I can't seem to get my syntax proper. If I just used the $date variable it works no problem, however when I add the "clean" folder before it, it won't create the folder. Thoughts?

<?php
$time = $_SERVER['REQUEST_TIME'];
$date =  date(Ymd_Hms, $time);
$new =  "clean/".$date;

echo $new;

if(!is_dir ($new))
{
mkdir($new);
}
?>




Aucun commentaire:

Enregistrer un commentaire