About Lesson
Running Your First PHP File
- Save file as
hello.php
inhtdocs
folder (if using XAMPP). - Start Apache server from XAMPP Control Panel.
- Open browser → go to: http://localhost/hello.php
- xample (
hello.php
):
Example:
PHP
<?php
echo "Welcome to PHP!";
?>
Output in browser:
Welcome to PHP!