Re: include-problem
| From: | Sophie Mattoug | Date: | Mon, 01 Dec 2003 11:36:47 +0000 |
| Subject: | Re: include-problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171451@lists.php.net to get a copy of this message | ||
Victor Spång Arthursson wrote:
Hi! I'm having a problem with including files. What I want to achieve is to execute a PHP-script on another server, and then to include the result (which will be XML-output) in another PHP-script (currently on my local computer). On the server I have the file http://server.com/test/echo.php with the content --- <?php echo 'xyz'; ?> --- Locally I've a file with the following content: --- <?php echo "!!!"; include ("http://server.com/test/echo.php"); echo "???"; ?> --- I was expecting the output from my locally testfile to be something like: --- !!!??? --- but rather it is --- !!!xyz??? --- I've also tried with a $fp = readfile("http…") with the same result, which is output of the echo-statement in the remote file which I am expecting to be evaluated remotely. How can I do to include the PHP-script and have it to be ran before it is included? Sincerely VictorThis is a perfectly normal behaviour ! See www.php.net/include to understand what this function does. (comparing to www.php.net/require) Hope this helps, -- Cordialement, --------------------------- Sophie Mattoug Développement web dynamique sophie@mattoug.net ---------------------------