Это мой первый подход к Zend. Имея это действие индекса:
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->variable="I'm testing my controller";
if($this->_request->isGet())
{
$name=$this->_request->getQuery('mykey');
$this->view->name=$name;
}
}
}
и это представление index.phtml:
echo $this->variable;
if (isset($this->name))
{echo $this->name;}
Если я наберу этот URL:
http://localhost/index/index/mykey/2
Разве я не должен видеть вывод «2» в моем индексном представлении?? Я просто вижу «Я тестирую свой контроллер»;
P.S. нужно объяснение больше, чем решение =)
Благодарность
Лука