Lesson 1.3: Your First PHP Script
📖 Introduction to PHP
⏱️ 15 min
Let's create your first PHP script!
Step 1: Create a File
Navigate to C:\xampp\htdocs (Windows) or /Applications/XAMPP/htdocs (Mac).
Create a new file called hello.php with this content:
<?php
echo "Hello, World!";
?>
Step 2: View in Browser
Open your browser and go to http://localhost/hello.php
You did it!
You just created and executed your first PHP program! The echo statement outputs text to the browser.
✓ Free Lesson
This lesson is completely free. No enrollment required. Continue learning!