Page 1 of 1

creating directories help

Posted: Thu Aug 12, 2010 4:48 pm
by daxguy
I am trying to create a no of directories but the code is giving the following error

Warning: mkdir() [function.mkdir]: Invalid argument in C:\xampp\htdocs\gl\movie_process.php on line 174

the code is

Code: Select all

for(i=0; i=5 i++)
{
                     $base_folder = "{$base}uploads/movies/{$year}/{$month}/{$title}/";
			$path = $base_folder.$hosting[$i];
          							mkdir($path);
}
please help anyone?

Re: creating directories help

Posted: Fri Aug 13, 2010 12:59 pm
by Jsphlane20
I see several syntax errors with your code. Your for loop should look something like this

Code: Select all

for($i=0; $i<=5; $i++){

}
Also Echo out the $path variable and see what it displays for the value. It could be incorrect syntax for creating a directory.