Re: php header function...

From: Date: Sat, 09 Nov 2002 02:52:12 +0000
Subject: Re: php header function...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123537@lists.php.net to get a copy of this message
Try removing all leading spaces between the shebang and the beginning of the script: #!/usr/bin/php -q <?php Marco -- ------------ php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers On Fri, 2002-11-08 at 21:55, Brad Apps wrote: > Hey, > > > > Got a problem using the header function on a file upload page to redirect > the user back to a web page. Here's the code: > > > > #!/usr/bin/php -q > > > > <?php > > > > $filedest = "/home/$directory"; > > > > if (copy($clientfile,"$filedest/$clientfile_name")) > > > > header("Location: http://www.webfusion.net.au..."); > > > > else > > > > print("Error"); > > > > Any ideas on how i would get this to work. The error which shows is > Warning: Cannot add header information - headers already sent.... > > > > Thanks in advance. > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#123537) next »