Home  >  Article  >  Backend Development  >  php编码奇怪有关问题

php编码奇怪有关问题

WBOY
WBOYOriginal
2016-06-13 11:48:52801browse

php编码奇怪问题

<br /><?php<br /><br />include(TPLPATH.'/header.tpl.php');<br /><br />if($moban['nrb_kg454']=='0'){<br />	jump(-1,'功能关闭');<br />}<br /><br />?><br /><br /><br /><?php include(TPLPATH.'/footer.tpl.php');?><br />

文件原本在记事本是查看是uft编码,可是当我把if($moban['nrb_kg454']=='0'){
jump(-1,'功能关闭');
}这个删除掉后再用记事本查看就变成了ansi编码,这是什么情况,求原因
文件下载地址:http://www.wdlyhs.com/ee/niuren.tpl.rar
------解决方案--------------------
因为文件里唯一一处汉字没有了。

对于英文字母数字常见符号,utf8和ascii是一样一样的, 


------解决方案--------------------
在没有bom头的情况下 如果没有中文字符,则两组编码的文件内容是一致的,编辑器认为文件是ascii,再有中文的情况下,编辑器会进行匹配

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn