查看源代码php_是否可以查看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
表格网站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”,因为其余只是服务器的指令,不会传递给查看器。 在此测试⽅案中,仅将⽂本发送到⽤户的浏览器。 最终⽤户永远看不到代码。
查看源代码php
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论