Jun
17
2013
				
				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
Recent Snippets
- htaccess : Only allow access to specific wordpress upload types if logged in
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- JavaScript : Allow Tab in Textarea
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification

 A snippet by admin
 A snippet by admin   
					 
 




