从互联网浏览器检查元素时如何定位服务器上的 .php 代码和文件?
当我使用 Firebug 检查网页的某个元素时,我无法识别它使用的是哪个 .php 代码,也无法识别我可以在服务器上的哪个 php 文件上找到此代码。有没有其他方法可以从浏览器中查找 php 代码片段?
非常感谢,
亚瑟
When I inspect an element of my webpage using Firebug, I cannot identify which .php code it using and on which php file I can find this code on from the server. Is there any other way to locate pieces of php codes from a browser?
Many thanks,
Arthur
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以编辑源代码以打印出来。也许是 HTML 注释,例如:
我积极努力隐藏 PHP 文件用于生成任何特定 HTML 输出的内容严重的安全威胁。
You could edit the source code to make print out. Maybe a HTML comment such as:
<!-- Start of index.php -->
I actively work to hide what PHP-file is used to generate any specific HTML-output as it makes out a serious security threat.
查看浏览器的地址栏。 Firebug 检查适用于当前浏览器页面,它不知道 PHP 是什么 - 它只是 HTML 内容,无论生成内容的服务器上运行的脚本如何。
如果这没有帮助,请详细说明您的问题。
Look at the address bar of the browser. Firebug inspect works for the current browser page and it doesn't know what PHP is - it's just HTML content, regardless of the script running on the server that generated the content.
If this doesn't help, elaborate your question.
如果这可能的话,它会降低 php 的安全性,安全性的一部分就是模糊性,如果你可以简单地找出哪个文件做了什么,那么发起有针对性的攻击就会容易得多。
If this were possible it would make php less secure, a part of the security is the obscurity, if you could simple find out which file does what it would be much easer to launch a targeted attack.