html内嵌php出现乱码,最简单的php程序也通不过
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> <title>connect.php</title><body> <strong>This is true.</strong>">ÕâÊǸö³¬Á´½Ó<table> <tr> <td>rrrrrr</td> <td>hhhhhh</td> </tr></table><?php $a=8; $b=4; if($a>$b){ $a++; } $c=$a+$b; echo "a+b=".$c;?>
我这里要是单单
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $a=8; $b=4; if($a>$b){ $a++; } $c=$a+$b; echo "a+b=".$c;?>
是能显示出来的
或者
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> <strong>This is true.</strong>">超级连接
也能显示出来,
但是下面放了
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><table> <tr> <td>rrrrrr</td> <td>hhhhhh</td> </tr></table>
就出现乱码了。。。为什么会这样?
——解决方案——————–
应该不可能。除非你输入时就已经乱码了。
——解决方案——————–
看看你的文件编码
——解决方案——————–
1.文件自身编码
2.html编码
<meta http-equiv=”Content-Type” content=”tex本¥文来源gaodai$ma#com搞$代*码*网(搞代gaodaima码t/html; charset=utf-8″/>
——解决方案——————–
- PHP code
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>connect.php <body> This is true.">超级链接
rrrrrr | hhhhhh |
<?php $a=8; $b=4; if($a>$b){ $a++; } $c=$a+$b; echo "a+b=".$c;?>