pass a variable in the url in zend

浪尽此生 提交于 2019-12-11 07:36:51

问题


I am not able to a pass a variable value in the URL in Zend.

echo '<a href="/page/page-info/page_id/"' .$this->hidden_page_id. '"/">Back</a>';

if I simple echo $this->hidden_page_id I get the value on the above page. But When I pass it above through a link it does not show the value. Do I have to store it in a session or something?


回答1:


What you get when do a var_dump?

var_dump($this->hidden_page_id);

An advice, use View Helpers:

echo '<a href="' . $this->url(array('controller' => 'page', 'action' => 'page-info', 'page_id' => $this->hidden_page_id)) . '">Back</a>';


来源:https://stackoverflow.com/questions/9387473/pass-a-variable-in-the-url-in-zend

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!