gpt4 book ai didi

php - 如何在 .htaccess 中启用 allow_url_include 和 allow_url_fopen

转载 作者:行者123 更新时间:2023-11-29 03:48:24 24 4
gpt4 key购买 nike

.htacess

# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
allow_url_fopen On
allow_url_include On

我试过将它添加到我的 .htaccess 中,但没有用,我试过了

   $contnt = file_get_contents('http://site/files.php');
echo $contnt;

但是我收到这个错误

    Fatal error: Call to undefined function dijkstra() in /home/a2515416/public_html/algorithm.php on line 34

当我使用 xampp 时,一切正常。

最佳答案

考虑到您的代码在您的本地主机上运行并且您的主机中出现未定义的函数错误,您的主机使用的是旧版本的 PHP。

file_get_contents() 仅在 php 4.3 中引入。

确保您的服务器加载了最新版本的 php 或 php 版本 >=4.3。

关于php - 如何在 .htaccess 中启用 allow_url_include 和 allow_url_fopen,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17375565/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com