The most recent project is the development of the public platform, the official demo is PHP, found that most of the learning material is also PHP, then well, give up Java, to paragraph PHP bar
Let's talk about setting up a PHP environment under Mac
Database: mysql-5.6.26
OS x:10.11.1
Apache : 2.4.16
phpmyadmin:4.5.2
Editor: Sublime TEXT3
Apache:
The Mac system already comes with, open "terminal" input:
-V or and password
You can see the version information that comes with your system:
Server version:apache/2.4. - (Unix) Server built: A - *:£ º
Here are the basic commands:
// Launch Apache Service sudo apachectl Start // Restart Apache Service sudo apachectl Restart // Close Apache Service sudo apachectl stop
Configure Apache to add support for PHP
1 . Edit the http.conf configuration file with the following terminal: sudo vim/etc/apache2/http.conf2. Remove the comment from the following section: LoadModule php5_module libexec/ apache2/libphp5.so (i.e. remove the previous #)3. Restart Apache service:sudo apachectl restart
Next, open directly with the browser http://localhost the following page appears, that is, the configuration is successful
Now you can write a php file yourself, test1.php put in,/ library/webserver/documents under
Open Browser, http://localhost/test1.php
The following configuration phpMyAdmin, I do not know this thing has what eggs, accustomed to the terminal, as a Mysql-front use?
Download the latest version on http://www.phpmyadmin.net/home_page/downloads.php
To unzip the resulting folder, rename it to phpMyAdmin, and move to:
Create a new config.inc.php file under this folder
Configure Php+apache+phpmyadmin under Mac