faqts : Computers : Programming : Languages : PHP : Common Problems : Files

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 15 people (73%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Why can i access a local file but not a remote file with fopen()?

Dec 13th, 2001 00:10
ditoiu cristian, Mark,


version 1:
your hosting company has set in php.ini
allow_url_fopen = Off
cal them or change it yourself to
allow_url_fopen = On
version 2 : 
you don't use the fopen properly ie : 
<?
$src = fopen("http://www.google.com/", "r");
	while(!feof($src)) 
		{
        		$line = fgets($src, 1024);
                        print $line;
                }
?>