婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > dede驗證碼不顯示最終解決方法

dede驗證碼不顯示最終解決方法

POST TIME:2020-04-04 13:30

排除gd2和權限問題后還是不顯示

那么一定是bom問題 存在于dede utf8版本中

用下面的程序 批量處理即可

保存為bom.php放于網站根目錄 執行一下 就可以了
<?php
//remove the utf-8 boms
if (isset($_GET['dir'])){ //要去除的文件目錄,無參數則為文件當前目錄。
$basedir=$_GET['dir'];
}else{
$basedir = ‘.’;
}
 
$auto = 1;
 
checkdir($basedir);
 
function checkdir($basedir){
if ($dh = opendir($basedir)) {
while (($file = readdir($dh)) !== false) {
if ($file != ‘.’ && $file != ‘..’){
if (!is_dir($basedir.”/”.$file)) {
echo “filename: $basedir/
$file “.checkBOM(“$basedir/$file”).” <br>”;
}else{
$dirname = $basedir.”/”.
$file;
checkdir($dirname);
}
}
}
closedir($dh);
}
}
 
function checkBOM ($filename) {
global $auto;
$contents = file_get_contents($filename);
$charset[1] = substr($contents, 0, 1);
$charset[2] = substr($contents, 1, 1);
$charset[3] = substr($contents, 2, 1);
if (ord($charset[1]) == 239 && ord($charset[2]) == 187 &&
ord($charset[3]) == 191) {
if ($auto == 1) {
$rest = substr($contents, 3);
rewrite ($filename, $rest);
return (“<font color=red>BOM found,
automatically removed.</font>”);
} else {
return (“<font color=red>BOM found.
</font>”);
}
}
else return (“BOM Not Found.”);
}
 
function rewrite ($filename, $data) {
$filenum = fopen($filename, “w”);
flock($filenum, LOCK_EX);
fwrite($filenum, $data);
fclose($filenum);
}
?>


收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 北安市| 忻城县| 西乌| 清涧县| 修文县| 阳新县| 富裕县| 噶尔县| 蛟河市| 马尔康县| 永宁县| 渝北区| 防城港市| 黄龙县| 综艺| 塘沽区| 武山县| 伊通| 从江县| 乡城县| 日照市| 靖宇县| 明星| 许昌县| 沈丘县| 务川| 伊春市| 昌平区| 垦利县| 土默特左旗| 伊宁县| 滦平县| 襄垣县| 舒城县| 湄潭县| 永寿县| 湛江市| 高台县| 景泰县| 商丘市| 苍溪县|