RE: [PHP] Header

From: Date: Fri, 24 Aug 2001 06:06:56 +0000
Subject: RE: [PHP] Header
Groups: php.general 
Request: Send a blank email to php-general+get-64212@lists.php.net to get a copy of this message
> I want to open some html page from php in if..else..endif > condition but i dont't know how or which command I must use. > Please help me > > if i uses this in IF section : > > $path = "/route/index.htm"; > Header("Location: http://$SERVER_NAME$path"); > > result in browser is : Warning: Cannot add header information > - headers > already sent by (output started at > e:\programovanie\php\patenty\query.php:8) > in e:\server\route\query.php on line 20 It looks like you've already started output in the script (on line 8). You can't send a header once you've started to send web page content. That's why headers and body contents exist :) Jason -- Jason Murray jasonm@melbourneit.com.au Web Developer, Melbourne IT "Work now, freak later!"

« previous php.general (#64212) next »