Jump to content

Including PHP file from another server??


jwwceo

Recommended Posts

Hello,

 

I am trying to make a widget that bloggers can put in their sidebar with one line of code:

 

the code is this:

 

<?php include 'http://www.mysite.com/widget.php'; ?>

 

I am testing this on my server, and I get the following error:

 

Any ideas???

 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67

Warning: include(http://www.liquidcotton.com/widget.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67

Warning: include() [function.include]: Failed opening 'http://www.liquidcotton.com/widget.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67

Link to comment
https://forums.phpfreaks.com/topic/95511-including-php-file-from-another-server/
Share on other sites

The only setting I can see is : allow_url_fopen and it is set to ON.

 

Can anything else be causing this??

 

James

 

Then you will need to add allow_url_include yourself and set it to yes. It is off by default. Be aware though that this setting is also off in most host environments and that most users will not have the ability to change this setting. There is little you can do in this regard.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.