Re: Basic question about incuding files and funcitons
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Basic question about incuding files and funcitons

From: Geoff Muldoon <geoff.muldoon@trap.gmail.com>
Date: Thu Oct 06 2005 - 03:32:37 CEST

jimclay@netzero.net says...
> Interesting the bad word filter seems to be working, but now the program
> will not refresh the screen. I get this message:
>
> Warning: Cannot modify header information - headers already sent by (output
> started at /home/songc1/public_html/guestmap/badwords.php:36) in
> /home/songc1/public_html/guestmap/guestmap_place.php on line 75
>
> I believe line 75 must refer to this line of code:
>
> //go back to the map
> header('Location: '.$_SERVER['HTTP_REFERER']);
>
> I'm not sure what to do.

The line
header('Location: '.$_SERVER['HTTP_REFERER']);
is trying to set the header information AFTER
/home/songc1/public_html/guestmap/badwords.php:36
has already set the header information, by:
(a) issuing a print or echo statement
or
(b) containing some white space that the browser is rendering as output

The more common problem is (b)

Best way to check is to call badwords.php directly into a browser, and see
if you get any (even blank) output rather than a "document contains no
data" message.

Geoff M
Received on Tue Oct 18 02:32:31 2005