php-db | 2001041
Date: 04/03/01
- Next message: Renze Munnik: "Re: [PHP-DB] Auto load PHP"
- Previous message: Xsarus Internetdiensten: "Re: [PHP-DB] Search results"
- Next in thread: Renze Munnik: "Re: [PHP-DB] Auto load PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected> ** M: +31 6 218 111 43 ***************************
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Renze Munnik: "Re: [PHP-DB] Auto load PHP"
- Previous message: Xsarus Internetdiensten: "Re: [PHP-DB] Search results"
- Next in thread: Renze Munnik: "Re: [PHP-DB] Auto load PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

