Start a conversation

Create a folder using PHP code

To create a folder on the server partition, use the PHP command: mkdir ();

In the example below, I will create a folder where your name will be the current system date.

<php $folder = date("Ymd");mkdir ($folder, 0755); ?>

The value "0755", will be allowed to read / write the new folder.

I remember:

For dedicated servers, you can use 777.

To host servers / cpanel, you should use the permission to 755.


Choose files or drag and drop files
Was this article helpful?
  1. Amanda Santos (Migrated deleted Agent)

  2. Posted
  3. Updated