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, ∼2894🔥, 0💬
Popular Posts:
How to use the "return-response" Policy statement to build the response from scratch for an Azure AP...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to use the RSS Online Validator at w3.org? You can follow this tutorial to learn how to use the ...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...