作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
.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/
我是一名优秀的程序员,十分优秀!