RE: exiting/printing in functions

From: Date: Wed, 23 Jan 2002 17:24:53 +0000
Subject: RE: exiting/printing in functions
Groups: php.general 
Request: Send a blank email to php-general+get-81723@lists.php.net to get a copy of this message
Thanks Yasuo, But this is simply good form, no? >> print Header ("Location:$url"); > >this line should be > header('Location: '.$url); Both seem to work on our systems. - Sean -----Original Message----- From: Yasuo Ohgaki [mailto:yasuo_ohgaki@yahoo.com] Sent: Tuesday, January 22, 2002 5:44 PM To: sean@interconnect.is.it Subject: Re: exiting/printing in functions sean@interconnect.is.it wrote: > Hello, > > I wanted to run this by you folks to make sure that this won't cause any problems in other > OS'es, and just to ask if this is good php practice. > > I have a simple function: > > function relocate($action, $html, $url){ > if ($action){ > print $html; > exit; > } > else { > print Header ("Location:$url"); this line should be header('Location: '.$url); > exit; > } > } -- Yasuo Ohgaki Please CC me when you reply to news/list messages. Do not send reply only to me :)

« previous php.general (#81723) next »