- PHP

How to make a PHP file in XAMPP?

1. Navigate to your htdocs folder.

Example path: C:\xampp\htdocs.

2. Add a new file with .php extension.

For example, name it test.php.

3. Edit the file and put some content.

For example:

<?php
  echo 'Hello World!';
?>

4. Save the file and navigate to the localhost/path_to_file in your browser.

In this example case, it should be localhost/test.php.

Output: Hello World!