의 끝은 구문 오류 : 파일
오류를 찾을 수 없습니다, 말하는. 여기 코드입니다 :Parse error: syntax error, unexpected end of file in /mnt/sdcard/www/parts/background/editProfilePic_Process.php on line 96
<?php
session_start();
$site="http://".$_SERVER["HTTP_HOST"]."/";
$root=$_SERVER["DOCUMENT_ROOT"];
if(substr($root,-1)!="/")
{
$root=$root."/";
}
if(!isset($_SESSION["u"]))
{
header("location:".$site."user");
exit;
}
else{
$u=$_SESSION["u"];
}
if(!isset($_POST["access"]))
{
echo "You cannot access this page";
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<?php
include($root."parts/resources.php");
?>
</head>
<body>
<?php
// header also contents the <noscript> alert
include($root."parts/header.php");
?>
<div class="wholepage">
<div class="page scatterList">
<?php
if(isset($_FILES["profilePic"]))
{
$name=$_FILES["profilePic"]["name"];
if($_FILES["profilePic"]["error"] !== UPLOAD_ERR_OK) {
die("Upload failed with error code ".$_FILES["profilePic"]["error"]);
}
if(!getimagesize($_FILES["profilePic"]["tmp_name"]))
{
exit;
}
$path=$site."img/1/".$u.".jpg";
move_uploaded_file($path, $_FILES["profilePic"]["tmp_name"]);
}
?>
</div> <!-- end of .page -->
</div> <!-- wholepage -->
<!-- FOOTER -->
<?php
include($root."parts/footer.php");
?>
</body>
</html>
나는 그것을 없애 어떻게해야합니까?
그냥 디버깅하려고 .. 한 Statment 경우 첫 번째 닫지 않습니다. 진지하게. 그게 뭔가를 배울 수있는 유일한 방법. –
누락 된'}'some – DevZer0
적절한 코드 들여 쓰기를 사용하면 이러한 종류의 오류가 더욱 분명 해집니다. –