Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // The directory path
- $dir = "testdir";
- // Check the existence of directory
- if(!file_exists($dir)){
- // Attempt to create directory
- if(mkdir($dir)){
- echo "Directory created successfully.";
- } else{
- echo "ERROR: Directory could not be created.";
- }
- } else{
- echo "ERROR: Directory already exists.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement