전체 오류 : 구문 분석 오류 : 구문 오류, 라인 (56)PHP 구문 오류 ... 예기치 않은 T_VARIABLE?
I 라인 (56)에보고 된 그것을 알아낼 수 없습니다에 /home/u572186424/public_html/safe.php에서 예상치 못한 T_VARIABLE ...
exit();
전체 파일은 다음과 같습니다 그런데
<?php include_once("connect.php"); ?>
<?
$sql = "SELECT * FROM users WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'";
$query = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_object($query);
$id = htmlspecialchars($row->id);
$userip = htmlspecialchars($row->userip);
$username = htmlspecialchars($row->username);
$password = htmlspecialchars($row->password);
$account_type = htmlspecialchars($row->account_type);
$money = htmlspecialchars($row->money);
$exp = htmlspecialchars($row->exp);
$req_exp = htmlspecialchars($row->req_exp);
$level = htmlspecialchars($row->level);
$health = htmlspecialchars($row->health);
$max_health = htmlspecialchars($row->max_health);
$lastactive = htmlspecialchars($row->lastactive);
$energy = htmlspecialchars($row->energy);
$max_energy = htmlspecialchars($row->max_energy);
$will = htmlspecialchars($row->will);
$max_will = htmlspecialchars($row->max_will);
$brave = htmlspecialchars($row->brave);
$max_brave = htmlspecialchars($row->max_brave);
$strength = htmlspecialchars($row->strength);
$agility = htmlspecialchars($row->agility);
$guard = htmlspecialchars($row->guard);
$labor = htmlspecialchars($row->labor);
$iq = htmlspecialchars($row->iq);
$rank = htmlspecialchars($row->rank);
?>
<?php
$sql = "SELECT * FROM sitestats WHERE id='1'";
$query = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_object($query);
$admins = htmlspecialchars($row->admins);
$mods = htmlspecialchars($row->mods);
$hdo = htmlspecialchars($row->hdo);
$admins_ip = htmlspecialchars($row->admins_ip);
$mods_ip = htmlspecialchars($row->mods_ip);
$admin_array = explode("-", $admins);
$mod_array = explode("-", $mods);
$hdo_array = explode("-", $hdo);
$admin_ip_array = explode("-", $admins_ip);
$mod_ip_array = explode("-", $mods_ip);
?>
<html>
<body>
<?
if(isset($_SESSION['user_id'])) {
$sql = "UPDATE users SET lastactive=NOW() WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'";
mysql_query($sql);
}else{
header("Location: logout.php");
exit(); //ERROR HERE
}
$query = "SELECT account_type,rank FROM users WHERE username= "$username";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
if($row['account_type'] == 1){
$row['rank'] = "Player";
$rank = "Player";
}elseif($row['account_type'] == 2){
$row['rank'] = "VIP";
$rank = "VIP";
}elseif($row['account_type'] == 3){
$row['rank'] = "HDO";
$rank = "HDO";
}elseif($row['account_type'] == 4){
$row['rank'] = "Moderator";
$rank = "Moderator";
}elseif($row['account_type'] == 5){
$row['rank'] = "Admin";
$rank = "Admin";
}elseif($row['account_type'] == 6){
$row['rank'] = "Owner";
$rank = "Owner";
}
?>
</body>
</html>
, 당신이 말할 수 없었던 경우,이 코드는 PHP입니다. 제발 도와주세요! 감사!
오류 ** 사용자 이름 여기를 =" . $ username ** –
요, 들여 쓰기가 조금 밖에 없기 때문에 실제로 읽을 수 있습니까? 또한 오류가 사라질 때까지 코드를 줄이십시오. 오류가 발생하면 방금 삭제 한 항목에서 오류가 발생했습니다. 일반적으로 질문을 게시하기 전에 문제를 찾기 쉽기 때문에 먼저 이것을 수행하십시오. –