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.
我正在开发基于 php 的网站。当我尝试使用 file_get_contents 从同一目录加载文件时,服务器确实返回了一些字符串,但也返回了该文件的 php 代码。我想要php编译后的文件,而不是本机代码。我该如何解决这个问题?
改用这个:
include "file.php";
在 url 而不是路径上调用 file_get_contents
尝试改用 include() 函数。