RE: [PHP-WIN] Include()

From: Date: Tue, 22 Jan 2002 05:00:27 +0000
Subject: RE: [PHP-WIN] Include()
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-11550@lists.php.net to get a copy of this message
I'm not using it to include remote php files as I assumed it would still onlu be able to process the file after it was parsed by the remote system. I do however need to include remote html files which should not be affected by this problem. Hippie. At 04:38 PM 1/21/02 -0800, you wrote:
Yes, it works on Linux/Apache. But the results are not what you might expect. When one normally uses the include statement, you intend to process some php file, not the output from such a file. For example: nfo.php contains, located at http://www.myserver.com/nfo.php : ------BEGIN FILE--------- <?php function nfo($addr) {
    return getnamebyaddr($addr);
} echo nfo($REMOTE_ADDR); ?> -------END FILE----------- test.php contains, located at http://www.otherserver.com/test.php : ------BEGIN FILE--------- <?php include('http://www.myserver.com/nfo.php'); echo nfo($REMOTE_ADDR); ?> -------END FILE----------- When you visit http://www.otherserver.com/test.php, the nfo function is not defined, but results are returned by the include because the server connects to http://www.myserver.com and correctly includes the results (output) from that visit. It is essentially an alternative to fopen('http://www.myserver.com/nfo.php') if you just want to echo all the results of the fopen. -----Original Message----- You are right, it doesn't seem to work with windows, I don't know if it works with *nix either? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.windows (#11550) next »