是说,
解析错误:语法错误,第 96 行 /mnt/sdcard/www/parts/background/editProfilePic_Process.php 中的文件意外结束
找不到错误。
这是代码:
<?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>
我应该怎么做才能摆脱它?