/**
* InitPHP开源框架 - DEM
* @author zhuli
*/
class helloController extends Controller {
//rest_post|post 方法名称 + | + HTTP方法名
public $initphp_list = array("white_list", "to_json", "rest_post|post", "rest_get|get"); //Action白名单
/**
* 这个是rest get方法请求
*/
public function rest_get() {
$curl = $this->getLibrary("curl");
echo "<br/><h1>只能通过GET方法请求</h1>";
}
/**
* rest请求方式,这个方法必须使用 HTTP post来请求
*/
public function rest_post() {
echo "<br/><h1>只能通过POST方法请求</h1>";
}
}