ie解析php的工作方式实在是不太懂得

WBOY
Release: 2016-06-13 13:13:33
Original
778 people have browsed it

ie解析php的工作方式实在是不太理解
【ie的工作方式实在是不太理解】
index.php 文件中有一段是这个样子的:




 
include 'list.php';break; //加载index.php的时候调list.php进来
?>  



 
list.php 中最外层的div是这个样子的:

//some content
?>

在ie地址栏输入localhost/index.php之后,页面呈现了。查看页面源文件,问题出来了,大概是这个样子的:
这是最外层的div
Some content 

问题是,ie把index.php中的div标签给省略掉了。也就是这三个



期望的结果不是应该是这个样子的吗:




不得其解。

------解决方案--------------------
这个跟浏览器的rendering有关。其实和php没什么关系的了。已经是客户端了。
------解决方案--------------------
include 'list.php';break; ???

你在非循环结构中使用 break,必将导致一个严重的错误
因此,程序将输出些什么都是不确定的
------解决方案--------------------
既然如此,那么输出外层div的代码也完全可能并没有执行到

------解决方案--------------------
这个跟是否为IE没关系吧。 难道火狐下不是这样?
------解决方案--------------------
如果html不如你所期望,

那么不是ie的问题
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!