Hi bin Dabei ein PHP Script auf meiner HP zu installieren. Die Installation aht auch 1A geklappt nur kommt jetzt folgende Fehlermeldung wenn ich die Seite aufrufen will :
	Die Datei sieht folgendermassen aus :
	Hoffe jemand kann mir mit dem problem helfen.
mfg
Kazu
					Code:
	
	Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /srv/www/htdocs/web1/html/Forum/templates/Underworld/Plugin-Dropcalc/includes/dbAccess.class.php on line 12
Code:
	
	<?php
/***************************************************************************
 *                                Dropcalc
 *                            --------------------
 *   copyright            : (C) 2006 Koraa Design
 *
 ***************************************************************************/
class dbAccess
{
	private $linkid = 0;
	private $dbuser = '';
	private $dbname = '';
	private $dbhost = '';
	private $dbpass = '';
	function dbAccess()
	{
		$this->read_dbconfig();
		$this->linkid=mysql_connect($this->dbhost, $this->dbuser, $this->dbpass) or die("oops.. database connection failed");
		if($this->linkid)
			mysql_select_db($this->dbname, $this->linkid);
		return $this->linkid;
	}
	private function read_dbconfig()
	{
		global $db_parameters;
			$this->dbuser  = $db_parameters['db_user'];
			$this->dbhost  = $db_parameters['db_host'];
			$this->dbpass  = $db_parameters['db_pass'];
			$this->dbname  = $db_parameters['db_name'];
	}
	public function cleanup($tablename)
	{
		mysql_query("optimize table ".$tablename, $this->linkid);
	}
	private function db_down()
	{
		printf("
			<font face=\"Times New Roman\" size=\"3\">Shit happens!!!</font> <br>
			The Database-server is down.<br>
			After the reboot everything should work <i>soon</i> within normal parameters again.");
	}
	public function query($sql)
	{
		if(!$sql) return 0;
		$result = mysql_query( $sql, $this->linkid) or die ('<table width="99%" height="60px"><tr>'
			.'<td align="center"><font class="red"><b>'
			.mysql_error( $this->linkid).'</b></font></td></tr></table>');
		return $result;
	}
	private function error()
	{
		return mysql_error($this->linkid);
	}
	private function safe_query( $sql_in)
	{
		$sql_out = mysql_real_escape_string( $sql_in);
		echo $sql_out . '<br>';
		return $sql_out;
	}
	public function get_dbstats( $tbs=array())
	{
		$sql = 'SHOW TABLE STATUS FROM '. $this->dbname;
		if( $result = $this->query($sql))
		{
			$tables = 0;
			$rows = 0;
			$size = 0;
			while( $row = mysql_fetch_array( $result,MYSQL_ASSOC))
			{
				if( in_array( $row['Name'], $tbs) || empty($tabs))
				{
					$rows += $row['Rows'];
					$size += $row['Data_length'];
					$size += $row['Index_length'];
					$tables++;
				}
			}
		}
		$data[0] = $size;
		$data[1] = $tables;
		$data[2] = $rows;
		return $data;
	}
}
?>
mfg
Kazu
 
          
 Parse error: parse error, unexpected T_STRING
									
									
									Parse error: parse error, unexpected T_STRING
								

 - und nicht 3 oder so ... xD
 - und nicht 3 oder so ... xD 
							
						
Comment