In general examples, zend framework 1.x all installs the website root directory, that is, the root of the web server points to zend's public directory. Can it point to other directories?
The answer is yes, zend supports installation in non-root directories. For example, when the web server root points to the parent directory of public, the website access is like this http://xxx.com/public/module/controller/action
Specific method:
1) Let the routing know that public is the child Directory, instead of zend’s module name
In Bootstrap.php $ this->bootstrap('frontController'); $frontController = Zend_Controller_Front::getInstance(); $frontController->set BaseUrl(' public'); // set the base url!
2) References to js and css files.
This part is usually written in the view
< script src="=$this->baseUrl('js/main.js')?>">
The above introduces the installation directory of zend framework 1x (not the website root directory), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.