develop a simple blogging system using the Phalcon framework
Source code: Https://github.com/yanglr/phalcon_practice/tree/master/blog
With the Phalcon framework, you first need to download the Phalcon extension and then set it on in php.ini.
This article uses Phalcon to develop a simple blog system, the configuration environment is: linux+nginx+mysql+php+phalcon+bootstrap
Step1: Create folder blog under nginx corresponding web directory (for example: /home/www/server/blog
), and then git clone git@github.com:yanglr/phalcon_practice.git
./phalcon_practice/blog
Copy the contents into the folder /home/www/server/blog
;
Step 2: Configure the multi-module routing settings in the Conf/vhost in the Nginx configuration directory, and create the file dev.blog.io.conf file in this directory with the following contents:
Restart Nginx When you are finished modifying.
Step 3: Modify the information about MySQL in the app/config/config.php file, modify it according to the specific situation;
Step 4: Create the database Phalconblog in MySQL, and then import the SQL file Phalconblog-data.sql in the App/sql folder into MySQL, either directly in MySQL or import with Navicat ...
Step 5: Modify the/etc/hosts file to add a statement:
?.?.?.? dev.blog.io
Over here?.?.?.? Is the IP address you see under Linux using the Ifconfig command
Step 6: Access Http://dev.blog.io in a browser.
Special Note:
Account: admin Password: admin
Account: Test Password: Test
The above describes the use of the Phalcon framework to develop a simple blog system, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.