Re: NEWBIE.. Major problems with fopen() ??
| From: | Christian.. | Date: | Mon, 28 Apr 2003 20:25:46 +0000 |
| Subject: | Re: NEWBIE.. Major problems with fopen() ?? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145560@lists.php.net to get a copy of this message | ||
Hi
I tryed the file() and got the same:
Warning: file("http://www.cdn.dk/test.txt")
- No such file or directory in
/customers/roskilderoklub.dk/roskilderoklub.dk/httpd.www/php/test3.php on
line 3
Is it the provider who has stop the possibility to open a page on another
site ?
Christian
"Burhan Khalid" <phplist@meidomus.com> wrote in message
news:1442632123.20030428085134@meidomus.com...
> Hello cdn,
>
> Wednesday, May 28, 2003, 3:41:07 AM, you wrote:
>
> [ snip ]
>
> c> ini_set("allow_url_fopen", "On");
>
> Try ini_set("allow_url_fopen", "1");
>
> c> $handle=fopen("http://www.cdn.dk/test.txt",
> c> "r");
>
> Try this :
> if (!($handle = fopen("http://www.cdn.dk/test.txt",
> "r"))){
> die ("Cannot open file");
> }
>
> Also, this might be an easier approach :
>
> $contents = file("http://www.cdn.dk/test.txt");
> echo "<pre>"; print_r($contents); echo"</pre>";
>
>
>
> --
> Best regards,
> Burhan
> phplist[at]meidomus[dot]com
>
>