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.
2016-11-24, 1335👍, 0💬
Popular Posts:
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...
What Is Azure API Management Service? Azure API Management as a turnkey solution for publishing APIs...
What Is an HTML "em" Tag/Element? An "em" element is an inline element that you can use to specify t...
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...