0

给定一个简单的 HTML 文件,测试时有什么区别,直接双击打开它或上传到 IIS/Tomcat 并访问 localhost/simpleHTML?

4

2 回答 2

0

No, a simple HTML-only file will not be rendered differently most(99.9%) of the time by opening it directly by double-clicking from the local file system and accessing it from a web server. The only difference will be caused if the file contains any server side language (PHP, ASP etc..)

于 2012-07-06T06:18:00.623 回答
0

在 html 文件的情况下,它并不重要。重要的是页面是用 php、jsp 等语言制作的。直接打开时浏览器不会检测到包含 php 或 jsp 文件的网页。为此,我们使用 wamp、xampp、lamp、tomcat 等网络服务器,并通过 localhost/pagename 访问它。有关更多详细信息,只需查看 php 文件的页面源。您将无法在其中找到和 php 脚本。您将只能看到页面中的 html 部分。对于 html、javascript、css 等脚本语言,直接打开并不重要。

希望这对你有用。

于 2012-07-06T06:17:18.930 回答