- 1). Right-click the PHP file you want to use to create the directory. Click "Open With" in the pop-up window. Double-click the PHP editor in the list of programs.
- 2). Scroll down the file to the section of code you want to use to create the directory. You can create a directory anywhere between the "<?php" and "?>" tags. These two tags indicate to the PHP engine that PHP code is embedded in the file.
- 3). Type the following code to create a directory:
mkdir("/subfolder/mydir");
This code creates the folder "mydir" in the "subfolder" directory. You can also create a directory in the root folder. Use the following code to create the "mydir" directory in the root folder:
mkdir("mydir");
SHARE