PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
daxguy
Forum Newbie
Posts: 1 Joined: Thu Aug 12, 2010 4:27 pm
Post
by daxguy » Thu Aug 12, 2010 4:48 pm
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?
Jsphlane20
Forum Newbie
Posts: 17 Joined: Wed Aug 11, 2010 1:17 pm
Contact:
Post
by Jsphlane20 » Fri Aug 13, 2010 12:59 pm
I see several syntax errors with your code. Your for loop should look something like this
Also Echo out the $path variable and see what it displays for the value. It could be incorrect syntax for creating a directory.