-
/**
- * 过滤页面中bom
- * edit bbs.it-home.org
- */
- function checkBOM ($filename) {
- $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) {
- $rest = substr($contents, 3);
- rewrite $rest;
- }else{
- return false;
- }
- }
- ?>
复制代码
|
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
作者最新文章
-
2024-08-26 00:38:12
-
2024-08-26 00:35:12
-
2024-08-26 00:15:12
-
2024-08-26 00:13:12
-
2024-08-26 00:12:12
-
2024-08-26 00:11:12
-
2024-08-26 00:06:12
-
2024-08-26 00:01:12
-
2024-08-26 00:00:12
-
2024-08-25 21:48:12