Several minor issues about zendframework

Source: Internet
Author: User
Several questions about zendframework. i. my program directory structure is librarymodules & nbsp; -- company & nbsp; -- controllers & nbsp; & nbsp; & nb several questions about zend framework.
1. my program directory structure is
Library
Modules
-- Company
-- Controllers
-- ViewController. php
Index. php

The current access address is 127.0.0.1/user/index/view/id/88.

How does it become 127.0.0.1/user/view/id/88?

The second question.

I want to change the URL 127.0.0.1/user/index/view/id/88 to 127.0.0.1/user/88.
In this concise form, how should we define a route? the following method never works.

$ Route-> addRoute ('user ',
New Zend_Controller_Router_Route ('/user/: ID ',
Array (
'Controller' => 'index ',
'Action' => 'view'
)
)
);


Always report an error

Uncaught exception 'zend _ Controller_Action_Exception 'with message 'action "view" does not exist and was not trapped in _ call ()' in

Please take a look! Very grateful!
------ Solution --------------------
Although I don't understand php, it must be a good solution. I just need to find the path where it is by default.
------ Solution --------------------
ZF has never been used, but the CI route is a regular match.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.