Home  >  Article  >  Backend Development  >  php echo输出html问题 在线结贴

php echo输出html问题 在线结贴

WBOY
WBOYOriginal
2016-06-23 14:26:491405browse

很怪异啊。 我 echo每个html的时候 都是 echo""; 按理说都应该是蓝色标记,但是我有的是蓝色有的是灰色是怎么回事。


回复讨论(解决方案)

你的代码没转义

echo "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\">";//或者使用单引号echo '<meta http-equiv="Content-Type" content="text/html;charset=gb2312">';

你的代码没转义

echo "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\">";//或者使用单引号echo '<meta http-equiv="Content-Type" content="text/html;charset=gb2312">';


现在倒是好了。但是直接就是页面不出现。 全部页面都是在html设计好了把代码复制过来。然后加上 echo来输出。 不知道那有问题。如果不把echo放上。 就可以出现表格。




双引号里面的双引号没有添加转衣服\ , 或者外面用单引号。style 那里没用echo 输出也是会报错的。

提问最好不要发图,发代码方便大家复制!

你不如学习一下
heredoc 语法结构
nowdoc 语法结构(自 PHP 5.3.0 起)
这两种赋值方法

$str = <<<EOD这里可以放一大段html源代码EOD;echo $str;

提问最好不要发图,发代码方便大家复制!

echo "test";
?>


提问最好不要发图,发代码方便大家复制!



圈圈转的不错么, 应该要发代码的,有代码总是方便调试的么,,,不发代码上来,难道还让帮你调试的人再找一遍代码?

为嘛html要用echo,直接写html不好么?

你直接echo "试下。

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