RE: [PHP] How to include a page not on my host
| From: | Reuben D Budiardja | Date: | Fri, 30 Jun 2000 22:05:17 +0000 |
| Subject: | RE: [PHP] How to include a page not on my host | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4183@lists.php.net to get a copy of this message | ||
This could be happening also if you compile your php engine somehow not to
allow inclusion in remote file. I've got this problem before.
Rdb
At 11:48 AM 06/30/2000 -0400, you wrote:
>When I try include or require I get:
>
>Failed opening required 'http://www.xxxxxxxx.com/xxxx.html
>(include_path='')
>
>
>
>and when I try to use fopen I get:
>
>The file exists!Resource id #1
>
>
>My code:
>
><?
>$filename = "http://www.xxxxxxx.com/xxx.html";
>$fp = fopen($filename,"r");
>if ($fp){
> print"The file exists!";
>}else{
> print"The file does not exist";
>}
>echo $fp;
>fclose ($fp);
>?>
>
>OR
>
><?
>$tmp = "http://www.xxxxxxx.com/xxx.html";
>require $tmp;
>?>
>
>Confused,
>Peter
>
>-----Original Message-----
>From: Matt McClanahan [mailto:cardinal@dodds.net]
>Sent: Friday, June 30, 2000 11:50 AM
>To: Peter Benoit
>Cc: php-general@lists.php.net
>Subject: Re: [PHP] How to include a page not on my host
>
>
>On Fri, 30 Jun 2000, Peter Benoit wrote:
>
>> I've seen this done before, but I can't find the page anywhere! I'd like
>to
>> include a page that's not on my host into a page on my host.
>
>include and require both accept http:// and
>ftp:// URL's. However, if
>you're trying to include a PHP page on another host, be aware that when
>you include or require it, the file will be included after it as been
>parsed by the PHP engine on the remote server.
>
>Matt
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>