php 返回mysql字符编码与删除字符编码
function Ebak_GetSetChar($char){
global $empire;
if(empty($char))
{
return '';
}
$r=$empire->fetch1("SHOW COLLATION LIKE '".$char."';");
return $r['Charset'];
}
//---------------------返回设置编码
function Ebak_ReturnSetNames($char){
if(empty($char))
{
return '';
}
$dumpsql="DoSetDbChar('".$char."');rn";
return $dumpsql;
}
//--------------------去除字段中的编码
function Ebak_ReplaceFieldChar($sql){
global $phome_db_ver;
if($phome_db_ver=='4.0'&&strstr($sql,' character set '))
{
$preg_str="/ character set (.+?) collate (.+?) /is";
$sql=preg_replace($preg_str,' ',$sql);
}
return $sql;
}
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号