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

Best way to get user ip address in php...

Here is a function to getting ip using filter of local and lan ip's. function get_ip() { $list = array( 'REMOTE_ADDR', 'CLIENT_IP', 'HTTP_CLIENT_IP', 'HTTP_PROXY_CONNECTION',...

Number Format...

Format a number with grouped thousands......

Get all subsets of array...

If you have a list of items (for example)......

Encrypt and Decrypt function with different outputs...

Encrypt function return different value with each execute but decrypt function return input value. for example: first execute: encrypt('hello') => 'axxdfg34', decrypt('axxdfg34') return 'hello'...