Is there a way to log the received POST request data before the data validation stage implemented via Restler?
问问题
151 次
2 回答
2
使用 onValidate 事件,它在验证开始之前触发
//in your index.php after $r = new Restler()
$r->onValidate(function() use ($r){
Logger::log($r->getRequestData());
}
于 2013-11-16T10:03:06.023 回答
0
将它们复制到变量中,并验证变量内的值:'
$my_post = $_POST;
//consider we want to validate some query-parameter called q
if(isset($my_post['q']) && ! empty($my_post['p'])) {
//do something
}
于 2013-10-31T10:28:52.870 回答