PHP: Make or Create A Directory

by Yang Yang on April 22, 2009

Share This Article:
Subscribe to Kavoir: blog feed

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
Share This Article:
Subscribe to Kavoir: blog feed

You should also read:

Leave a Comment

{ 1 trackback }

Previous post:

Next post: