Re: NEWBIE.. Major problems with fopen() ??
| From: | Robert Cummings | Date: | Mon, 28 Apr 2003 21:32:07 +0000 |
| Subject: | Re: NEWBIE.. Major problems with fopen() ?? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145565@lists.php.net to get a copy of this message | ||
Just to rule out the obvious -- have you checked that you have allow_url_fopen
set to true??
http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen
Cheers,
Rob.
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
"Christian.." wrote:
>
> 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", "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
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php