Mkdir Function doesnt create multiple subdirectories..

Discussion in 'PHP' started by neil12345, Nov 22, 2009.

  1. #1
    I want to create 3 subfolders in a folder and write a text file to it

    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 ?
     
    neil12345, Nov 22, 2009 IP