Re: include()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Monday, June 13, 2005, 5:02:40 PM, you wrote:

IG> Is there a big difference between me including a file by putting
IG> the url in the include() such as
IG> include("http://www.examplesite.com/examplefile.php) and putting
IG> the server path such as
IG> include("number/www.examplesite.com/public_html/examplefile.php")

Well the first will have to use an HTTP stream (socket operation) in
order to open the file, whereas the second will use a simple File
stream. A file stream on a local host is nearly always going to be
faster as it carries far less protocol baggage with it.

IG> I assume I have to use the first example when the file is on a
IG> different server.

If the only way to access this file is via HTTP then yes.

You do realise that when you use include with an HTTP address that
only the *resulting output* of that PHP file will be included? (just
making sure -- you cannot split up code across servers using include)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux