Categories
PHP Tips & Tutorials

PHP: Make or Create A Directory

The function in PHP that’s used to create a directory is just the same with that in Linux bash shell: mkdir.

First make sure the current working directory is where you want the new directory to be, then run this line of PHP:

mkdir('new_dir'); // creates a new directory named new_dir under the current directory

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

One reply on “PHP: Make or Create A Directory”

Comments are closed.