Re: Auto load PHP

From: Date: Tue, 03 Apr 2001 08:43:16 +0000
Subject: Re: Auto load PHP
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8173@lists.php.net to get a copy of this message
On Tue, Apr 03, 2001 at 09:05:57AM +0100, Galvin, Max wrote: > Why not a simple if statement to check if the function worked and then > include("script2.php") ? > > M > Well... I've got three reasons for that... 1. I never use include() for redirection. It was never meant to be used for that anyway. 2. If you use include() you're only using up more memory. And I don't know 'bout you, but I always try to write as efficient as I can. 3. When you redirect someone, you want them to go to a different page don't you? Using include() they still stay on the same page. They only get a different content. So... using header() instead of include() is more efficient i.m.o. And besides that; my projects get pretty large. In that case it's smart to keep your code 'easy-to-track'. If you start including instead of redirecting it only gets more complex tracking the flow of the site. And that while include() offers no advantages. [ I.m.o. ] -- * R&zE: *************************** ** Renze Munnik ** ** E: renze@datalink.nl ** M: +31 6 218 111 43 ***************************

« previous php.db (#8173) next »