Here are two methods to install php in window is given below
Download xampp exe in window and install software using this software php will automatically install in your computer and you can check php is installed or not using the command line
Press Window Key +R
and then run box open and then type cmd in run box input and then command line is open.
Type php -version in terminal
C:\Users\exampot>php -version
C:\Users\exampot>php -version
PHP 7.4.7 (cli) (built: Jun 9 2020 13:36:15) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
You can download php file from the official https://www.php.net/downloads website and then download php for windows.
Extract PHP files in the C:\Program Files Folder.
php.ini is the PHP configuration file which indicates the behavior of your PHP. php.ini is the file you need to edit if you need some custom configurations.
You would open the php.ini
with the editor and search ;extension=pdo_mysql
you should be remove the leading semicolon (;
) and Press CTRL+S
for save the file.
PATH
variable in "System variables" box and then select it, and then click "Edit".php -version
in terminal for checking is php installed succesfully.
C:\Users\exampot>php -version