Home >Backend Development >PHP Tutorial >ZEND FRAMEWORK怎么URL传参

ZEND FRAMEWORK怎么URL传参

WBOY
WBOYOriginal
2016-06-13 09:59:31951browse

ZEND FRAMEWORK如何URL传参?
ZEND FRAMEWORK如何URL传参?

有一个CONTROL

如何访问LIST这个ACTION呢?并传一个ID过去。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpclass OtherController extends Zend_Controller_Action{    public function init()    {    }    public function indexAction()    {        $this->view->content = "A";    }        public function listAction()    {        $this->view->content = "B list";    }}


------解决方案--------------------
1.首先怎么传参,是和Zend的路由机制有关!

2.默认情况下是这样:

Other/list/id/5
或者
other/list?id=5
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn