my php file:
if($operation=='upload'){
if(isset($data -> paper) && !empty($data -> paper) && isset($data -> paper -> author) && isset($data -> paper -> description) && isset($data -> paper -> title)){
$author = $data -> paper -> author;
$description= $data -> paper -> description;
$title = $data -> paper -> title;
echo $fun -> uploadPaper($author,$description,$title);
}
json
{
"operation": "upload",
"paper": {
"author": "Mark Watson",
"description": "The book writing about AI by Mark Waton",
"title": "Practical Artificial Intelligence Programming With Java"
}
}
when i send json to server by post method,there is a error:
Parse error: syntax error, unexpected '$author' (T_VARIABLE) in D:\xampp\htdocs\server\index.php on line 78
i really don't know what is happening!please tell me