In the previous section, we have seen how to set up a XAMPP server on your computer. In this section, we will show how to run PHP code in XAMPP.
You can run PHP code in XAMPP by following the below steps.
<?php echo "My first php code."; ?>
Example: code1.php
Step3:Run the XAMPP server and start the Apache and MySQL.
Step4: Open any web browser and type localhost/code1.php on the search bar. Then, the output for the above PHP code(code1.php) will be shown as below.
0 Comments