zend framework 1x is installed in the directory (not the website root directory)

WBOY
Release: 2016-08-08 09:23:52
Original
1051 people have browsed it

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="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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template