admin管理员组文章数量:1794759
查看源代码php
查看源代码PHP
With many websites, you can use your browser or another program to view the document's source code. This is a common occurrence by viewers who want to see how a website developer accomplished a feature on a website. Anyone can view all the HTML that was used to create the page, but even if the web page contains PHP code, you can only view the HTML code and the results of the PHP code, not the code itself.
在许多网站上,您可以使用浏览器或其他程序查看文档的源代码。 想要查看网站开发人员如何在网站上完成某项功能的查看者经常遇到这种情况。 任何人都可以查看用于创建页面的所有HTML,但是即使网页包含PHP代码,您也只能查看HTML代码和PHP代码的结果,而不能查看代码本身。
为什么看不到PHP代码 ( Why PHP Code Isn't Viewable )All PHP scripts are executed on the server before the website is delivered to the site viewer. By the time the data gets to the reader, all that is left is the HTML code. This is why a person can't go to a .php website page, save the file and expect it to work. They can save the HTML and see the results of PHP scripts, which are embedded inside the HTML after the code is executed, but the script itself is safe from curious eyes.
在将网站交付给网站查看器之前,所有PHP脚本都在服务器上执行。 当数据到达阅读器时,剩下的就是HTML代码。 这就是为什么一个人无法访问.php网站页面,保存文件并期望它能正常工作的原因。 他们可以保存HTML并查看PHP脚本的结果,这些代码在执行代码后嵌入HTML内,但是脚本本身可以防止好奇。
Here is a test:
这是一个测试:
The result is PHP Code Test, but the code that generates it isn't viewable. Although you can see that there must be PHP code at work on the page, when you view the document source, you only see "PHP Code Test" because the rest is just instructions for the server and is not passed on to the viewer. In this test scenario, only the text is sent to the user's browser. The end user never sees the code.
结果是PHP Code Test ,但是生成它的代码是不可见的。 尽管您可以看到该页面上必须有PHP代码,但是当您查看文档源时,您只会看到“ PHP Code Test”,因为其余只是服务器的指令,不会传递给查看器。 在此测试方案中,仅将文本发送到用户的浏览器。 最终用户永远看不到代码。
翻译自: www.thoughtco/your-php-code-cant-be-viewed-2693939
查看源代码php
版权声明:本文标题:查看源代码php 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686621097a87265.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论