Re: NEWBIE.. Major problems with fopen() ??
| From: | Burhan Khalid | Date: | Mon, 28 Apr 2003 13:51:34 +0000 |
| Subject: | Re: NEWBIE.. Major problems with fopen() ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145528@lists.php.net to get a copy of this message | ||
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