Welcome Guest, Not a member yet? Register   Sign In
mkdir() using base_url() not working
#1

[eluser]Gukkie[/eluser]
Hi, i have a small problem here creating directories.

Im on my localhost, and i cant seem to get this code working to create a directory:

$curdate = date('dmy');
$make_directory = base_url().'uploads/'.$curdate;
mkdir($make_directory, 0755);


however when i change it to this, it works:

$curdate = date('dmy');
$make_directory = $_SERVER['DOCUMENT_ROOT'].'site1/uploads/'.$curdate;
mkdir($make_directory, 0755);


Any ideas on whats goin on?




Theme © iAndrew 2016 - Forum software by © MyBB