【发布时间】:2012-04-28 20:01:11
【问题描述】:
我遇到了这两个错误:
警告:file_get_contents() [function.file-get-contents]:在服务器配置中禁用 URL 文件访问 /home/content/.../wp-content/themes/mytheme/functions.php 在第 4035 行
警告:file_get_contents(http://www.mysite.net/...y-1.7.2.min.js) [function.file-get-contents]:无法打开流:没有合适的 包装器可以在 /home/content/.../html/wp-content/themes/mytheme/functions.php 上线 4035
这是第 4035 行
$myFile=file_get_contents(get_bloginfo('template_directory')."/js/jquery-1.4.2.min.js");
这只是服务器上的权限问题吗?我如何包装这个函数来防止错误并退出到有用的消息?
【问题讨论】:
-
allow_url_fopen在 php.ini 中被关闭。打开它或联系您的服务器管理员,他们可能有理由不允许它。
标签: php error-handling