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, 2278🔥, 0💬
Popular Posts:
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
How to troubleshoot the Orderer peer? The Docker container terminated by itself. You can follow this...