public function save(){
$content = input("content","","trim");
$WXAPI = $this->getWXAPI();
$path ="/ueditor/php/upload/image/20170120/1484911919290550.jpg";
$real_path = $_SERVER['DOCUMENT_ROOT'].$path; // C:\web\kaka_weixin\public/
// $real_path = ROOT_PATH.$path;//不能用ROOT_PATH C:\web\kaka_weixin\public/..\
dump($real_path);
$data = array("media"=>"@".$real_path);
$ret =$WXAPI->uploadImg($data);
if($ret){
dump($ret);
}else{
dump($WXAPI->getErrText());
}
}
$content = input("content","","trim");
$WXAPI = $this->getWXAPI();
$path ="/ueditor/php/upload/image/20170120/1484911919290550.jpg";
$real_path = $_SERVER['DOCUMENT_ROOT'].$path; // C:\web\kaka_weixin\public/
// $real_path = ROOT_PATH.$path;//不能用ROOT_PATH C:\web\kaka_weixin\public/..\
dump($real_path);
$data = array("media"=>"@".$real_path);
$ret =$WXAPI->uploadImg($data);
if($ret){
dump($ret);
}else{
dump($WXAPI->getErrText());
}
}