RE: [PHP-DB] Problem with file() function

From: Date: Tue, 19 Feb 2002 13:42:57 +0000
Subject: RE: [PHP-DB] Problem with file() function
Groups: php.db 
Request: Send a blank email to php-db+get-17051@lists.php.net to get a copy of this message
If you are behind a firewall or proxy, you will not be able to connect to www.php.net. If you are not behind a firewall or proxy and you are getting php_hostconnect errors then you need to make sure that you can get to the php.net other than with your browser. You can also try using fopen() as well... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -----Original Message----- From: Hayan Al Mamoun [mailto:hayan@ureach.com] Sent: Tuesday, February 19, 2002 3:58 AM To: PHPList (E-mail) Subject: [PHP-DB] Problem with file() function Dear sirs, Please help with the follows: When I'm trying to execute this code: -------------------------------- $fcontents = file ('http://localhost/'); while (list ($line_num, $line) = each ($fcontents)) { echo "<b>Line $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n"; } -------------------------------- it runs perfectly, but when I try to change to: -------------------------------- $fcontents = file ('http://www.php.net/'); while (list ($line_num, $line) = each ($fcontents)) { echo "<b>Line $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n"; } -------------------------------- it dosn't work, Can you tell why please... Best Regards Hayan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#17051) next »