Reply to Re: Basic question about incuding files and funcitons

Your name:

Reply:


Posted by Jimmy Clay on 12/08/50 11:28

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.

--

Jimmy Clay

Read free ebooks !!!!!
Go to my web page:
www.songofthecoyote.com/

"Jimmy Clay" <jimclay@netzero.net> wrote in message
news:1128556086.1f0f39036372d86c36deacf6d25b51f6@teranews...
>I believe I've discovered two problems with the code. First I didn't put in
>the ";". So I changed the file in guestmap_place.php to now read:
>
> include('badwords.php');
> check($message);
>
> Also I realized that I had a problem with the file name "badwords.php".
> The actual file had a space between the "s" and the ".". I corrected that.
>
> Now I get this error message:
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/songc1/public_html/guestmap/badwords.php:38) in
> /home/songc1/public_html/guestmap/guestmap_place.php on line 75
>
>
> --
>
> Jimmy Clay
>
> Read free ebooks !!!!!
> Go to my web page:
> www.songofthecoyote.com/
>
> "Jimmy Clay" <jimclay@netzero.net> wrote in message
> news:1128553799.b80372a73b0fa22d0671e1bc9256e27f@teranews...
>> I've made the suggested changes and the error I get is:
>>
>> Parse error: parse error, unexpected T_STRING in
>> /home/songc1/public_html/guestmap/guestmap_place.php on line 27
>>
>> In the file guestmap_place.php, I have the lines:
>>
>> include('badwords.php')
>>
>> check($message)
>>
>> Line 27 is ' check($message) '
>>
>>
>>
>> The file ' badwords.php ' now reads:
>>
>> <?php
>> //* badwords.php */
>>
>> function check($message) /* Establishes the function check */
>> {
>>
>> global $message; /* Gets All Variables */
>>
>> //To Add New Words, Just Copy One Line From Below And Paste It Below The
>> Third Line.
>> //Just Replace the first word in quotes with the word you would like,
>> //and the second word in quotes to what you would like to change it to.//
>>
>> $message = str_replace("badword1","**",$message); /* Replaces the word
>> "hey" into "****" */
>> $message = str_replace("badword2","**",$message);
>> $message = str_replace("badword3","**",$message);
>>
>> echo $message;
>>
>> }
>> ?>
>>
>>
>>
>>
>> --
>>
>> Jimmy Clay
>>
>> Read free ebooks !!!!!
>> Go to my web page:
>> www.songofthecoyote.com/
>>
>> "Samuel" <lets.monroe@gmail.com> wrote in message
>> news:1128523099.532719.303100@g47g2000cwa.googlegroups.com...
>>> If you're calling it as
>>>
>>> check($message)
>>>
>>> you need to change the declaration of the function to
>>>
>>> function check ($message)
>>> {
>>> ...
>>> }
>>>
>>> and remove the "return check()" line from the separate page where you
>>> have the function. Also, it would help if you told us exactly what
>>> errors you are getting.
>>>
>>> Greetings.
>>>
>>
>>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация