Home >Backend Development >PHP Tutorial >php gbk编码5c有关问题

php gbk编码5c有关问题

WBOY
WBOYOriginal
2016-06-13 11:03:29833browse

php gbk编码5c问题

<?php$a = "誠\";$len = strlen("$a");for($i=0;$i<$len;$i++){printf("%0x",ord($a[$i]));echo "\n";}printf("%0x",ord("\\"));echo "\n";echo chr(hexdec("d5")).chr(hexdec("5c"));echo "\n";?>

?如果单纯写echo "誠";则出现语法错误。PHP Parse error: syntax error, unexpected end of file in /home/keke/1.php on line 5

原因通过以上代码就可以明白了。

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