🟢 Foundation · Lesson 02
PHP Setup with XAMPP
PHP Setup with XAMPP
Setting Up PHP
The easiest way to run PHP on your computer is XAMPP — it bundles PHP, Apache (web server) and MySQL together.
Installation Steps
- Download XAMPP from apachefriends.org and install it.
- Open the XAMPP Control Panel and click Start for Apache and MySQL.
- Put your PHP files in the
htdocsfolder (e.g.C:/xampp/htdocs/). - Open
http://localhost/yourfile.phpin the browser.
Test File
<?php
echo "PHP is working!";
?>PHP is working!
Summary
- XAMPP bundles PHP + Apache + MySQL for local development.
- Put files in
htdocsand open viahttp://localhost/.
PHP Setup करना
अपने computer पर PHP चलाने का सबसे आसान तरीका XAMPP है — यह PHP, Apache (web server) और MySQL को एक साथ bundle करता है।
Installation Steps
- apachefriends.org से XAMPP download करके install करें।
- XAMPP Control Panel खोलकर Apache और MySQL के लिए Start दबाएं।
- अपनी PHP files
htdocsfolder में रखें (जैसेC:/xampp/htdocs/)। - Browser में
http://localhost/yourfile.phpखोलें।
Test File
<?php
echo "PHP is working!";
?>PHP is working!
सारांश
- XAMPP local development के लिए PHP + Apache + MySQL bundle करता है।
- Files
htdocsमें रखें औरhttp://localhost/से खोलें।
💻 Live Code Editor
Is page ki language (PHP) mein code likhein aur turant chalाएं — yahीं, bina kuch install kiye.Powered by OneCompiler. Agar editor na khule to yahान naye tab mein kholein.
💻 Live Code Editor
Is page ke program yahan ready hain — chalाएं, badlें aur seekhें. Bina kuch install kiye.
Powered by OneCompiler. Editor mein code apne aap aa jata hai — Run dabaakर output dekhें.
Agar load na ho to naye tab mein kholें.