getPower($_GET["id"],$collectionId); if($power<10){ $output = array(); $output["title"]="Sorry对不起"; $output["subtitle"]="No Power For Read
没有阅读权限"; $output["summary"]=""; $output["content"]="This is a **private** rescouce, reading need special power.
该资源是**私密**资源,阅读需要权限。"; $output["owner"]=""; $output["username"]=array("username"=>"","nickname"=>""); $output["status"]=""; echo json_encode($output, JSON_UNESCAPED_UNICODE); exit; } #查询权限结束 /* PDO_Connect(""._FILE_DB_USER_ARTICLE_); $id=$_GET["id"]; $query = "SELECT * FROM article WHERE id = ? "; $Fetch = PDO_FetchRow($query,array($id)); */ $Fetch = $article->getInfo($_GET["id"]); if($Fetch){ $Fetch["content"] = $article->getContent($_GET["id"]); $userinfo = new UserInfo(); $user = $userinfo->getName($Fetch["owner"]); $Fetch["username"] = $user; echo json_encode($Fetch, JSON_UNESCAPED_UNICODE); exit; } } echo json_encode(array(), JSON_UNESCAPED_UNICODE); ?>