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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php