是否可以列出已包含在最终页面中的 PHP 文件?
假设有一个复杂的 PHP 脚本,其中包含许多其他 PHP 文件的动态包含。是否可以列出 PHP 脚本执行某个时刻之前包含的所有文件?
Say there is a complex PHP script with a lot of dynamic inclusions of other PHP files. Is it possible to list all the files, that have been included up to a certain point of execution of a PHP script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然,存在 get_included_files 函数。
示例:
结果将类似于:
Sure, there exists get_included_files function for that.
Example:
Result will be like:
http://php.net/manual/en/function.get-included -files.php
http://php.net/manual/en/function.get-included-files.php