|
Posted by Alan Jones on 05/14/07 03:13
On Mon, 14 May 2007 10:50:46 -0400, Jerry Stuckle
<jstucklex@attglobal.net> wrote:
>This is working normally. When you said:
>
><?php include('http://jalanjones.com/test/content.php');?>
>
>This resulted in another call to the server to fetch test/content.php.
>So the URL in there will be "test/content.php". The only difference
>here is you included it from the server side instead of the client side
>- but when the http: request reaches the server, the server neither
>knows nor cares about the origin. The PHP file is executed and the
>results returned to index2.php, where they are displayed.
>
>Now, if you would have instead done something like:
>
> <?php include($_SERVER['DOCUMENT_ROOT'] . '/test/content.php');?>
>
>This would have gone directly to the file system and included the file
>without an additional call to Apache. The file would have been
>included, the code executed and the results displayed.
>
>Do you see the difference between the two?
Yup, I get it now. I'm just going to use the file system paths for
now rather than spend more time doing experimentation in this
area. It's good to know using http paths is still an option, doable.
Thank you for the help. :) Everyone has been very helpful. I'm
saving each reply for future reference.
[Back to original message]
|