Handling input with the Zend Framework (Post,get,etc)

前端 未结 6 1730
闹比i
闹比i 2021-02-01 05:04

im re-factoring php on zend code and all the code is full of $_GET[\"this\"] and $_POST[\"that\"]. I have always used the more phpish $this->_

6条回答
  •  天命终不由人
    2021-02-01 05:43

    not directly related to the topic, but to insure that you get an number in your input, one could also use $var+0 (however if $var is a float it stays a float) you may use in most cases $id = $this->_request->getQuery('id')+0;

提交回复
热议问题