softwareplay
softwareplay

Reputation: 1409

Get parameter not working in Zend Framework 1.12.3

i'm new to zend framework and i have i problem getting a GET parameter (zend framework 1.12.3). I though i had to type

localhost/controller/parameter/value

To make a GET parameter and then in the controller:

 $id = $this->getRequest()->getParam( 'id');
 $this->view->id= $id;

But i'm getting this server error:

GET /localhost/controller/parameter/1 HTTP/1.1" 404 7173

What am i missing?

Upvotes: 0

Views: 787

Answers (1)

Samy Lstmn
Samy Lstmn

Reputation: 126

This would work if ID was part of your url which is not.

To retrieve ID param, your URL should look like : http://domain.com/controller/action/id/12

Upvotes: 5

Related Questions