這篇文章主要介紹了PHP批量去除BOM頭代碼分享,本文直接給出實現代碼,代碼比較簡單,容易看懂,需要的朋友可以參考下
? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <?php /** * 去除bom頭信息 */ header("Content-Type:text/html; charset=utf-8"); $auto = 1; checkdir("D:wampwwwsales"); function checkdir($basedir){ if ($dh = opendir($basedir)) { while (($file = readdir($dh)) !== false) { if ($file != '.' && $file != '..'){ if (!is_dir($basedir."/".$file)) {新聞熱點
疑難解答