Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以准确理解该open_basedir ini设置的作用,但是在阅读文档时,它描述了它如何防止包含攻击——攻击者可以通过包含文件来攻击系统。
open_basedir ini
但是,我找不到这方面的一个例子,这到底是什么。
能否提供此类攻击的示例
您可以在服务器上包含其他用户的文件。
所以你的文件库:/home/marty/
另一个用户文件库:/home/user231
如果没有 open_basedir(并且文件权限错误),您可以包含其他用户文件:
include("/home/user231/public_html/connection.php");
或者:
file_get_contents("/home/user231/public_html/connection.php");