mkdir function in PHP ?

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

Post Reply
neil123
Forum Newbie
Posts: 1
Joined: Sun Nov 22, 2009 8:07 am

mkdir function in PHP ?

Post by neil123 »

I want to create 3 subfolders in a folder and write a text file in those sub folders

My code is as follows :

$old = umask(0);
mkdir("/var/www/abc.com/httpdocs/12345/1", 0777,true);
umask($old);

$old = umask(0);
mkdir("/var/www/abc.com/httpdocs/12345/2", 0777,true);
umask($old);

$old = umask(0);
mkdir("/var/www/abc.com/httpdocs/12345/3", 0777,true);
umask($old);

What it does is, it creates the main folder "12345" and creates subfolder "1" in it; but doesnt create "2"

& "3" folders ?

Can anyone help ?
Post Reply