Re: include()

From: Date: Mon, 13 Jun 2005 16:59:41 +0000
Subject: Re: include()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216898@lists.php.net to get a copy of this message
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 IG> 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

« previous php.general (#216898) next »