Advertisement
Shell_Casing

PHP mkdir() 1

Mar 19th, 2018
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1.  
  2. <?php
  3. // The directory path
  4. $dir = "testdir";
  5. // Check the existence of directory
  6. if(file_exists($dir)){
  7.     echo "ERROR: Directory already exists.";
  8.     } else{
  9.    mkdir($dir);
  10.    echo "Directory created successfully.";
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement