级R片内射在线视频播放,人妻少妇精品视频一区二区三区,中文字幕在线亚洲精品,中文字幕国产无码

互聯(lián)網(wǎng)品牌整合服務(wù)·為夢(mèng)想者創(chuàng)造夢(mèng)想品牌

服務(wù)1000+企業(yè),專注企業(yè)網(wǎng)站設(shè)計(jì) / 網(wǎng)站制作 / 網(wǎng)站優(yōu)化推廣 網(wǎng)站托管服務(wù)

了解詳情

致力于服務(wù)頭部企業(yè).打造標(biāo)桿項(xiàng)目

讓每一個(gè)作品融入我們的洞察力,創(chuàng)造并呈現(xiàn)精彩 展現(xiàn)您的非凡與不同

了解詳情

網(wǎng)站優(yōu)化 網(wǎng)站搜索排名

濰坊及全國(guó)各地區(qū)提供搜索引擎優(yōu)化服務(wù)

了解詳情

做網(wǎng)站過(guò)程如何移除BOM 

發(fā)布時(shí)間:2016/8/16 9:11:16 關(guān)注:1445


給客戶做網(wǎng)站的過(guò)程中發(fā)現(xiàn)頁(yè)面頂部總有一個(gè)空白區(qū)域,使用chrome檢查發(fā)現(xiàn),添加了&#65279 bom文件頭代碼,按照網(wǎng)上的說(shuō)法,使用程序編輯軟件就能移除,使用DW看到已經(jīng)顯示移除,可奇怪的是一只存在,在網(wǎng)上搜索的過(guò)程中發(fā)現(xiàn)以下代碼可以一次全部檢測(cè)程序代碼中的bom,同時(shí)可以移除,希望有幫助到同樣迷惑的朋友們。
<?php
//remove the utf-8 boms
//by magicbug at gmail dot com
if (isset($_GET['dir'])){ //config the basedir
 $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);
}
?>

  • 上一條:請(qǐng)不要以安全的名義對(duì)客戶進(jìn)行綁架
  • 下一條:公司對(duì)臨朐建設(shè)局網(wǎng)站升級(jí)SSL加密通信
  • 濰坊網(wǎng)站建設(shè),濰坊網(wǎng)站優(yōu)化,濰坊網(wǎng)站排名,濰坊網(wǎng)站改版,濰坊網(wǎng)站營(yíng)銷策劃,濰坊網(wǎng)站制作,濰坊網(wǎng)站托管,濰坊網(wǎng)站百度排名,濰坊網(wǎng)站培訓(xùn),濰坊seo培訓(xùn),濰坊網(wǎng)絡(luò)公司

    地址:山東省濰坊奎文區(qū)新華路樂(lè)川街華誼大廈三樓

    網(wǎng)址:http://www.baohezhiyao.com/ 垂詢電話:

    網(wǎng)站備案:魯ICP備14027302號(hào)-5

    copyright© 濰坊華邦網(wǎng)絡(luò)有限公司2011-2025