示例#1
0
 public function getFile($hash)
 {
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $resultObj = array_merge(array("chkForQuery" => true, 'returnQuery' => $returnQuery), $this->resultObj);
     $chk = array("bool" => true, "traceID" => "getFile");
     //----------------------------------------------------------
     $queryString = "SELECT files.name FROM files WHERE files.hash = '{$hash}'";
     //----------------------------------------------------------
     $chk = Result::go($queryString, $resultObj);
     //----------------------------------------------------------
     $file = $this->thumbRelPath . $chk['result'][0]['name'];
     //----------------------------------------------------------
     return GenFun::data_uri($file, 'image/jpeg');
 }