Jun
17
2013

Make a new directory

/**
 * Function to make new directory
 * @access public
 * @param string full path to new directory
 * @return bool
 */
function new_directory( $directory )
{
    if( !is_dir( $directory ) )
    {
        if( mkdir( $directory ) )
        {
            chmod( $directory, 0744 );
            return true;
        }
        else
        {
            return false;
        }
    }
}

Leave a comment