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 4035Warning: 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?
You need to enable
allow_url_fopenandallow_url_include(if you want to load remote resources usinginclude) in your php.ini config file. Also, you can try adding this to.htaccessbut I don’t think it will work if you’re running php as an apache module – it’s not suppose to override this setting…