$Server_System;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$Server_System = 'windows';//filename will be changed into utf-8 in windows
} else {
$Server_System = 'linux';
}
function my_file_exists($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return file_exists($path);
}
function my_file_get_contents($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return file_get_contents($path);
}
function my_filemtime($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return filemtime($path);
}
function my_file_put_contents($path,$data)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return file_put_contents($path,$data);
}
function my_is_dir($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return is_dir($path);
}
function my_md5_file($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return md5_file($path);
}
function my_sha1_file($path)
{
global $Server_System;
if($Server_System == 'windows')
{
$path = iconv('utf-8','gbk',$path);
}
return sha1_file($path);
}