RE: Function Misbehaving

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

 



On Wed, November 15, 2006 12:13 pm, Programmer wrote:
> Problem solved: the reason print($url) caused the program to work is
> because
> the page calling Secure_Login no longer existed and therefore the
> print
> forced a die--I assume.  I included a die in the redirect function and
> all
> was well.  Including die in the redirect function made sure the page
> that
> was redirected stop executing.  The final question to the PHP
> community with
> this issue is: if a page myphppage.php has a redirect in it, how can
> it
> execute code after the redirect if it no longer exists?  Is it because
> the
> server side code cares not that it has been redirected and only what
> is
> happing inside the php code?

Rant #37

The server doesn't do ANYTHING interesting with the re-direct.

What you are actually doing is sending a NEW url all the way back to
the browser.

*then* the browser has to start all over again asking the webserver
for yet another url.

Then your webserver has to fire up or use yet another HTTP child
process to handle the request, and use up even more resources to
process the requested url.

Maybe you should just do an include() and then an exit.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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