How to install the latest version of php: 1. Enter the official website and download the latest version of php compressed package; 2. Unzip php to the directory where the apache server is located; 3. Edit the httpd.conf configuration file and add modules; 4. Edit the php.ini configuration file and specify the extension library path.
First enter the official PHP download website and select the latest version of php to download;
(Recommended tutorial:php graphic tutorial)
Then unzip the downloaded PHP package to the same directory as the Apache server
Then start configuring PHP, the specific method is as follows:
Add the following code to httpd.conf in the conf directory of apache:
LoadModule php5_module "E:/wamp/php-5.6/php5apache2_4.dll"PHPINIDir "E:/wamp/php-5.6/" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
Modify the path according to your own situation.
(Learning video recommendation:php video tutorial)
Change the php.ini-development file to php.ini;
In php.ini Specify the corresponding function module in , here we need to specify the extension library path of php.
extension_dir = "C:/myenv/php-5.3.5/ext"
Write a test file with the following content:
Run the test file. If the following content appears, the configuration is successful.
The above is the detailed content of How to install the latest version of php. For more information, please follow other related articles on the PHP Chinese website!