Tools, FAQ, Tutorials:
Creating a Directory in PHP
How To Create a Directory in PHP?
✍: FYIcenter.com
You can use the mkdir() function to create a directory. Here is a PHP script example on how to use mkdir():
<?php if (file_exists("/temp/download")) { print("Directory already exists.\n"); } else { mkdir("/temp/download"); print("Directory created.\n"); } ?>
This script will print:
Directory created.
If you run this script again, it will print:
Directory already exists.
⇒ Removing an Empty Directory in PHP
⇐ Working with Directories and Files in PHP
2016-11-24, 2534🔥, 0💬
Popular Posts:
How to install "The Windows SDK version 8.1"? I need to build my Visual Studio C++ applications. If ...
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
What Is session_register() in PHP? session_register() is old function that registers global variable...
How to create a "Sign-up or Sign-in" user flow policy in my Azure AD B2C directory? If you want to b...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...