0

I'm getting these 2 errors:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/content/.../wp-content/themes/mytheme/functions.php on line 4035

Warning: file_get_contents(http://www.mysite.net/...y-1.7.2.min.js) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/content/.../html/wp-content/themes/mytheme/functions.php on line 4035

Here's line 4035

$myFile=file_get_contents(get_bloginfo('template_directory')."/js/jquery-1.4.2.min.js");

Is this just a permissions issue on the server? How might I wrap this function to prevent the error and exit out to a useful message?

4

1 回答 1

0

您需要在 php.ini 配置文件中启用allow_url_fopenallow_url_include(如果您想使用 加载远程资源include)。此外,您可以尝试将其添加到,.htaccess但如果您将 php 作为 apache 模块运行,我认为它不会起作用 - 它不应该覆盖此设置...

php_value allow_url_fopen On
于 2012-04-17T13:12:56.177 回答