The study of the collection, the article from http://www.cnblogs.com/imwtr/p/4499691.html
In this, very grateful to the author of the article to share, this article is completely reproduced from the above link, here as a backup, convenient to view the use.
Front-end not only to do the page display layer, but also responsible for the data interaction part, do not wait until the back-end staff to do a good job before the front-end to start docking, so too passive.
The front end in the completion of static page encoding, it is necessary to conduct data interaction simulation, such as AJAX data interaction, simulation and background docking.
To the real front and back end of the joint adjustment, can be more convenient.
1. to interact with the data, you have to have a backstage bar. Backstage can use Php,java also can ah, but the contrast is slightly more complex, with this match that (also like to put on the Sina cloud above debugging, Java relatively expensive)
2. database random, MySQL is very common
3. since you want to simulate, you have to have access, not just local access on the line, a server, from the other terminal access to see is not normal?
(Sometimes when you do a mobile phone page, although chrome above the phone simulator effect is correct, but put on the mobile browser to see, there is a problem.) So set up a server, from time to time with mobile phone access, so that the page to better show.
One way is to put in the Sina Cloud, put on the public network to go directly can access, another is in the computer with a server, such as a WiFi hotspot, the computer and mobile phones are connected to this WiFi, is within the local area network, mobile phone can be carried out on the computer server access. )
4. How to build it?
LAMP-linux,apache,mysql,php is a good choice, but perhaps the front-end is rarely used for Linux, the choice of Wamp is also good
Wamp build up is also very simple, there is a wampserver software package, one-click installation, convenient and fast.
Different versions may have differences, go to the official website to download the latest version of it
Or just search for the download.
Next click Install directly, do not say, all the way down, with its default on the line (it is installed by default C, you can change to D-plate)
Finally, after the installation is finished, the default has already helped you to complete the basic configuration.
Try it.
First, you start the service. Find Wampserver directly from the Start menu, like this icon, click on it
Then is the service opening phase, look at the lower right corner of the computer icon information, there are three kinds of colors
Red indicates the service is not on, Orange is on (or some modules are unhealthy), green means successful (three modules are OK)
Service opened successfully, how to access it?
Notice the installation path of the Wampserver just now, if it is the D disk, then in the D packing directory to find Wamp folder, in the inside to find the WWW folder, www folder is the default access path of the project.
What do you say, by default www only these two files
Index.php is the default initial file.
The browser address bar input location can access to the index.php, the default is to use: 80 port number, some computers may be wrong, like this
This is because the default port 80 is occupied, we can configure Apache port.
Click the green icon in the lower-right corner, and then check the 80-port occupancy to show that it is occupied
Then let's change the Apache configuration file httpd.conf
Is the last third file on the top, click it to open (or open it directly under File path, similar to this path)
You can change the port 80 to 88 or 8080 or anything else, and I remember to change three places (one is a comment and two is not a comment).
For convenience, direct ctrl+f to replace all 80 with 8080.
Restart wampserver--Click the green icon, Restart all services
Browser input localhost:8080 will be able to access the
Of course, you can directly click on the localhost detection is successful access, click phpMyAdmin can enter the MySQL visual data management, try it
To some real, now in the WWW inside the new project folder mytest, browser input localhost:8080/mytest will default access to the folder under the index.php file, in index write a code to try
Browser access has been successful, 127.0.0.1:8080/mytest is the same, the same truth.
Now is local access, if other terminal access it?
No problem, the LAN can access each other
Assuming the computer's current IP address is a.b.c.d
On the phone (to connect wifi,3g network is not LAN) IP is A.B.C.D1
Mobile phone access to a.b.c.d:8080/mytest on the line
However, many times you will encounter the problem below, unable to access
"You don ' t has permission to access/on the" this server. "
In fact, it is also related to the Wampserver configuration, or httpd.conf
A lot of people on the Internet have said that it's okay to change the deny to allow.
But also because the version is inconsistent, the configuration file is not exactly the same, sometimes you have to change another place
Change allow from 127.0.0.1 to allow from all
Restart, wampserver, the phone will be able to access the
Because WWW is the default project home directory, you can find it in the configuration file and modify the path yourself
In addition, the visualization of MySQL is through the above mentioned phpMyAdmin view the use
You can also use the console command line
MySQL configuration files such as passwords can go to the two INI file to see
Wampserver to build Apache server and PHP environment for computer