Codeigniter Create Directory


Codeigniter Create Directory– You can create directory in codeigniter same as core PHP. Here in this tutorial, we are going to explain how to create directory in codeigniter in standard way.


Codeigniter Create Directory | Folder Example

You can create directory in codeigniter simply as below –

Codeigniter Create Directory Example:

 $path = "images/profile";

    if(!is_dir($path)) //create the folder if it's not exists
    {
      mkdir($path,0755,TRUE);
    } 

The above example will create folder profile in images folder if it does not exists. It will assign the folder permission 0755 so you can add permission as per your need.


Advertisements

Add Comment

📖 Read More