/*
* Method to create file 创建文件
* Parameter : (string)filename, (string)content, (string)create mode
* Return : (boolean)
*/
function create_file( $file, $content = '', $mode = "w" )
{
$handle = @fopen( $file, $mode );
if ( ! $handle )
{
return false;
}
else
{
if ( ! @fwrite( $handle, $content ) )
{
@fclose( $handle );
return false;
}
@fclose( $handle );
return true;
}
}