PHP Parse error: syntax error, unexpected $end

Status
Niet open voor verdere reacties.

vlaspld

Gebruiker
Lid geworden
2 mei 2010
Berichten
5
Ik heb zojuist mijn php versie van mijn webserver verhoogd van versie 5.2.4 naar versie 5.2.17.

Nu had ik en script draaien welke niet meer werkt na deze upgrade.
Zou iemand me kunnen helpen met deze error:
PHP Parse error: syntax error, unexpected $end in /var/www/vhosts/*****.nl/httpdocs/carrousel/include/functions.inc.php on line 101

het script is:
PHP:
<?php

// Use autoload function
function __autoload($class_name)
{
	require_once $class_name . '.php';
}

function is_debugger()
{
	return in_array($_SERVER['REMOTE_ADDR'], unserialize(DEBUG_IP));
}

function is_firefox()
{
	$agent = '';
	// old php user agent can be found here
	if (!empty($HTTP_USER_AGENT))
		$agent = $HTTP_USER_AGENT;
	// newer versions of php do have useragent here.
	if (empty($agent) && !empty($_SERVER["HTTP_USER_AGENT"]))
		$agent = $_SERVER["HTTP_USER_AGENT"];
	if (!empty($agent) && preg_match("/firefox/si", $agent))
		return true;
	return false;
}

function getVar($var, $strRet="")
{
	if (isset($_POST[$var]))
		return $_POST[$var];
	elseif (isset($_GET[$var]))
		return $_GET[$var];
	elseif($strRet != "")
		return $strRet;
	else
		return "";
}

// Redirect user
function redirectMe($strUrl)
{
	// Redirect user to specified $strUrl
	?>
	<script language="JavaScript">
		window.location = "<?php echo $strUrl; ?>";
	</script>
	<?
	exit;
}

// Print an array (for testing purpose only)
function printArray($arrayData, $strColor='black')
{
	if(in_array($_SERVER['REMOTE_ADDR'], unserialize(DEBUG_IP)))
	{
		echo '<pre><font color="'.$strColor.'">';
		print_r($arrayData);
		echo "</font></pre>";
	}
}

function stripInput($strInput)
{
	// Remove any HTML tags from input
	$strInput = strip_tags($strInput);

	// Remove any HTML karakters from input
	$strInput = htmlspecialchars($strInput, ENT_QUOTES);

	// Remove any spaces at the beginning and end of input
	$strInput = trim($strInput);

	// Return stripped input
	return $strInput;
}

function validEmail($strEmail)
{
	if (!eregi( "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $strEmail))
	{
		// Incorrect emailaddress
		return false;
	}
	else {
		return true;
	}
}

function isNumber($intNum, $intZero = "")
{
	if($intZero == 0)
	{
		return ereg("^[0-9]+$", $intNum);
	}
	else
	{
		return ereg("^[1-9]+$", $intNum);
	}
}
?>
De error zou zitten in de afsluitende ?>
alleen dit zou ik vreemd vinden want open deze goed... wie kan me helpen.. zit me me handen in het haar en mijn websites liggen nu plat door deze error
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan