开发者

drupal include php file from web

I want to

include("http://domain.com/file.php") 

in either my drupal module or theme.

but I get

Failed opening required 'http://domain.com/file.php' (include_path='.:/opt/lampp/lib/php')

what is the correct way to do t开发者_高级运维his?

thanks!


Set allow_url_fopen = On in php.ini. Get more info here


That is the proper way. However allow_url_include needs to be set to true in your php.ini.


Your PHP version need to be >= 4.3.0.

You need to enable the "allow_url_fopen" in your php.ini file:

allow_url_fopen = On

I suggest you to read on the include function in php.net.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜