Home  >  Article  >  Backend Development  >  How to install the latest version of php

How to install the latest version of php

王林
王林Original
2020-08-19 13:18:072992browse

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.

How to install the latest version of php

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

How to install the latest version of php

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"
<IfModule mod_php5.c>
  PHPINIDir "E:/wamp/php-5.6/"
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
</IfModule>

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"

How to install the latest version of php

Write a test file with the following content:

<?php
    phpinof();
?>

Run the test file. If the following content appears, the configuration is successful.

How to install the latest version of php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn