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, ∼2897🔥, 0💬
Popular Posts:
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
Where to get a real Atom XML example? You can follow this tutorial to get a real Atom XML example: 1...
How to run PowerShell Commands in Dockerfile to change Windows Docker images? When building a new Wi...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...