1. Environment.
The author's environment is win7 32bit ultimate version. I use xampp1.7.4 (the php version 1.8.x is too high, I personally think php 5.3X is more practical) + the latest version of mq. The focus is on configuring the virtual machine,
Refer to http://www.bkjia.com/article/52123.htm
The local xampp is installed on the D drive, giving my configuration: virtual machine configuration file path D:xamppapacheconfextrahttpd-vhosts
host configuration file location
C:WindowsSystem32driversetchosts.ics
Hosts is not found on this machine. It is also possible to change hosts.ics.
2. Create a new myqee project
1. Download the latest version of myqee, github, you know.
Unzip it to the D:/xampp/htdocs/mq folder (consistent with the virtual machine configuration).
Modify config.new.php to config.php
I also need a .htacess. The one I downloaded from github has never worked. I need the one written in the official document. The content is as follows
Copy a copy to the wwwroot directory.
a. Create a new project, open config.php in the root directory, and add an s project,
The configuration is as follows (put before the default configuration)
Create a new directory s under b.projects. For convenience, copy defautl directly and rename it.
Create a new simplest controller helloworld.controller.php
in controllers in the s directory
The content is as follows
Use with firefox + firebug.
3. Display the content in the database.
Hello world is so simple that it has little meaning in actual development. Strike while the iron is hot. Let’s do some dry stuff, read data from the database, and display it in the corresponding view.
a. Create a new config.php and place it in the s root directory and write the corresponding database configuration. The content is as follows:
Here I created an mq library in mysql and created a table wh_list
The ddl of wh_list is as follows, (add the content yourself).
b.model set up.
Create a new models directory in the s directory, and create a wh.model.php with the following content:
Modify the helloworld controller above. The content is modified as follows:
Don’t get excited, if you browse the mq/index.php/helloworld just now, you will definitely get an error and there will be no view.
In views, create new wh.view.php
The content is as follows:
After refreshing, you can see the contents of the `name` column of the wh_list table.
Haha, isn’t it a great sense of accomplishment?
The novice tutorial is written here first. Disclaimer, this is just for novices to get started quickly and get a feel for the framework.
The PHP framework is just a relatively standardized class. For ajax and permission management, you have to write your own classes.
I personally recommend thinkphp because there are many tutorials on the Internet. I am learning this framework.
ror is a framework developed in ruby, and qeephp is a framework developed in php. . . There is no native rapid development language