After learning the Zend framework, I still did not understand the path problem, so that the image could not be displayed normally. I searched Google for a solution. The specific solution is as follows:
Use the following code in. htaccess to replace the original code.
# Zend framework Rewrite Rules
Rewriteengine on
Rewritecond
% {Request_filename }! -F
Rewriterule. * index. php
#
Security considerations: List contents are not allowed
Options-Indexes
# PHP settings
Php_flag magic_quotes_gpc
Off
Php_flag register_globals off
Php_flag short_open_tag on
When accessing:
For example, my css.css file is under public/CSS. The website directory is the webapp under the website root directory.
The CSS reference in the template file is:
Absolute reference address:/webapp/public/CSS/css.css
Relative reference address: the address displayed in the current browser is the reference directory.
For example, the current access address is http: // localhost/webapp/
Then our relative reference address is :. /Public/CSS/css.css
For example, the current access address is changed to http: // localhost/webapp/index.
The reference address is :.. /Public/CSS/css.css