Introduction: This is a detailed page for configuring Zend framework in Ubuntu 10.10. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 334919 'rolling = 'no'>
I have never used frameworks to develop websites. I have always written all of them by myself and found that the efficiency is very slow.
Finally, the zendframework is successfully configured under ubuntu10.10.
Step 1
Open the rewrite module of Apache, because this step must be executed when Apache is used in Ubuntu.
1 |
Sudo a2enmod rewrite # activate the rewrite Module |
2 |
Sudo/etc/init. d/apache2 restart # restart the Apache server after activation |
Step 2
, Install Zend framework
1 |
sudo apt-get install zend-framework |
The system automatically installs dependency packages, including bin and php5-cli. After successful installation, the Zend library is located in the/usr/share/PHP/libzend-framework-PHP Directory.
Step 3
, Configure the include_path path information. Modify the zend-framework.ini under the/etc/PhP5/CONF. d directory, remove the semicolon before include_path, save and exit.
Step 4
Run the ZF command to create a web application. Run the command line to enter the/usr/bin directory and enter
Then, enter the project path (arrange the project path according to your preferences). Some subdirectories such as application public appear in the specified directory, in this way, a ZF-based Web application is successfully created. Here, my project name is zftest.
Step 5
, Configure Apache information about this project. Because the default Apache web directory is under/var/WWW
Apache automatically locates the web application under the specified directory. Here we create a configuration file about zftest in/etc/apache2/CONF. D, called
Zftest. conf. The file content is:
01 |
<IfModule alias_module> |
02 |
Alias /zftest
"/home/”xxx“/ZFTest/public/" |
03 |
<Directory
"/home/”xxx“/ZFTest/public/"
> |
07 |
RewriteCond %{REQUEST_FILENAME} !-f |
08 |
RewriteRule !\.(css|js|jpg|gif|png|swf|flv)$ index.php |
09 |
Options FollowSymlinks MultiViews |
Step 6
, Modify the. htaccess file in public .. Htaccess is a hidden file. You can view and display the hidden file. The file content is as follows:
3 |
RewriteCond %{REQUEST_FILENAME} -s [OR] |
4 |
RewriteCond %{REQUEST_FILENAME} -l [OR] |
5 |
RewriteCond %{REQUEST_FILENAME} -d |
6 |
RewriteRule ^.*$ - [NC,L] |
7 |
RewriteRule ^.*$ index.php [NC,L] |
Step 7
, Restart the Apache server
1 |
sudo /etc/init.d/apache2 restart |
Enable http: // 127.0.0.1/zftest to display
1 |
Welcome to the Zend Framework! |
2 |
This is your project's main page |
Even if the configuration is successful.
More articles on "Configuring Zend framework in Ubuntu 10.10"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/334919.html pageno: 10.