Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Work With mkdir() function in PHP ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 137
    Comment on it

    The mkdir() function is basically use for making a directory.

    Syntax of mkdir() function

    mkdir("dir_name");

    You can see below example of mkdir() function.

    <?php
    // here call mkdir()
    mkdir("testdocs");
    ?>
    

    In the above given example we use mkdir()function and Pass the directory name

    When you want create a sub directory inside existing directory

    then, Syntax will be following:

    mkdir("dir_name/sub_dir_name");

    you can see example also

    ?php
    // here call mkdir()
    mkdir("testdocs/sub_testdocs");
    
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: