Zend 取get或post参数的方法:

1、get:

<?php
    $req 
$this->getRequest();
    echo 
$req->getParam('id');    
?>

或者这样:
<?php
    
echo $this->_getParam('id');
?>

2、post:

<?php
    $content
=$this->_request->getPost('content');
    
$title=$this->_request->getPost('title');
    
$message=new Message();
    
$data=array(
        
'content'=>$content,
        
'title'=>$title
    
);
    
$message->insert($data);
?>

相关文章:

  • 2021-08-07
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案