Go to the website: apachefriends.org
Download and install XAMPP on your system.
Open the XAMPP Control Panel.
Start both Apache and MySQL.
Go to the htdocs
folder in your XAMPP installation.
Create a file named info.php
and write this code:
<?php phpinfo(); ?>
Open browser and go to: http://localhost/info.php
If PHP is working, you'll see the PHP information page.
Location: C:\xampp\php\php.ini
Open this file using Notepad or any text editor.
You can adjust things like:
upload_max_filesize = 10M
post_max_size = 12M
display_errors = On
After making changes, save the file and restart Apache.
Save your PHP files inside the htdocs
folder.
For example, if you save hello.php
, you can open it in the browser like this:
http://localhost/hello.php
Path: C:\xampp\htdocs\xyz
localhost/xyz