Jump to content

[SOLVED] cannot find error, unexpected end


PC Nerd

Recommended Posts

hi guys

 

i know you dont want to just debug scripts, but i cant find the error in this script:

 

<?php

require("inc_files/Database_link.inc");
require("inc_files/Page_Data.inc");

#function sensor_words($Body) {

#$Sensor_Words = array("###", "###", "###");
#$Sensor_Char = array("!", "@", "#", "$", "%", "^", "&", "*");

#$Words = explode($Body, " ");
#$Periods = explode($Body, ".");
#foreach($Periods as $Key => $Period_Word) {
#	if($Period_Word != ".") {
#		$Period_Place[] = $Period_Word;
#	}
#}
#$Period_Index = 0;

#foreach($Words as $Word) {								#20
	#foreach($Sensor_Words as $Sensor_Word)	{
		#if($Word == $Sensor_Word) {
			#$Word_len = strlen($Word);
			#while($Word_Len != 0) {
			#	$Sensord_Word = $Sensord_Word.rand($Sensor_Char);
			#	$Word_Len --;
			#}
			#if($Word == $Period[$Period_Index]){
			#	$Sensord_Message = $Sensord_Message.".";
			#	$Period_Index = $Period_Index + 2;
			#}
			#$Sensord_Word = "#$%^";
		#$New_Message[] = $Sensord_Word;
		#}
		#else {
		#	$New_Message[] = $Word;
		#}
	#}
	#if($Word == $Period[$Period_Index]){
	#	$Word = $Sensord_Message.".";						#40
	#}
#$New_Message[] = $Word;

#}
#$New_Message = implode( " ", $New_Message);
#echo $New_Message;






#$New_Message = str_replace("###", "#$%^", $Body);
#}

#if(isset($_POST['Message_Body'])) {
#	$Body = $_POST['Message_Body'];
#	$New_Message_Out = sensor_words($Body);
#}
											#60
function sensor_words() {

$New_Message = $_POST['Message_Body'];
$Sensor_list = array("####");
$Sensor_Char_list("!", "@", "#", '$", "%", "^", "&", "*");

$Sensor_Char_Replace = rand($Sensor_Char_list).rand($Sensor_Char_list).rand($Sensor_Char_list).rand($Sensor_Char_list);
foreach($Sensor_list as $Sensor_Word) {

	$New_Message = str_replace($Sensor_Word, $Sensor_Char_Replace, $New_Message);
}

}



											#77
?>
<html>

......


 

 

html stuff here

 

php code in the body of the page:

 

<?php


											#120

#$New_Message = sensor_words();

echo "<br><br><br>\n";

echo $New_Message;


?>

 

 

the error is "Parse error: parse error, unexpected $end in Message_Handler.php on line 142

 

 

thanks

 

ps. i know that the way im filtering may not be the best way to do this, but im just starting.thanks

Link to comment
https://forums.phpfreaks.com/topic/40675-solved-cannot-find-error-unexpected-end/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.