Create directory function

Create directory if not exists.

function createDir( $dir )
{
   if ( !is_dir( $dir ) ) {
      mkdir( $dir, 0777 );
      return true;
   }
   return false;
}

Tags

No tag here.

Recommended pages

Change timestamp to custom format...

Use this function for change timestamp to custom format......

Random string generator...

Random string generator. Optionally, you can give it a desired string length. function rnd_string($len = 24) { $str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $str...

Extract numbers from a unicode string...

Quick extract numbers from a unicode string......

Detect file extension function...

This function is used to find the file extension also you can use pathinfo() function for get information about a file path. function ext($file_name) { return substr($file_name, strrpos($fi...