开发者

PHP include external file with specified port

开发者 https://www.devze.com 2023-03-19 10:16 出处:网络
I am trying to include an external PHP file in my PHP script using the include function, however as soon as I specify a port as part of the URL I get a connection timed out error.

I am trying to include an external PHP file in my PHP script using the include function, however as soon as I specify a port as part of the URL I get a connection timed out error.

For example:

include "http开发者_Go百科://www.url.com:8090/login.php";

As I said it works fine without the port so do I need change a PHP setting or use a different method.

Note: Using port 80 is not an option.


if(@fsockopen("serverurl", port, $errno, $errstr, 1)){ 
    include('serverurl/file.extension');
}
0

精彩评论

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