How to test and run PHP code or PHP scripts on your browser?
This hub will show you on how to run simple PHP code on your browser using XAMPP and Notepad++. You can make your own php code or try other php code examples. You can also try my php code example on the given links at the end of this hub.
Steps on Running a PHP code or PHP scripts on your own browser.
1. Download PHP editor preferably Notepad++. (Assuming you do not have a Notepad++)
2. Install Notepad++
3. Download XAMPP for free. (Assuming you do not have a Notepad++)
4. Install XAMPP
5. Open XAMPP
Example XAMPP Photo When Openned
See all 5 photos
6. Run the Apache and My SQL on the XAMPP window by clicking “Start Button”
Example Photo When My SQL and Apache are Running
See all 5 photos
7. Open Notepad++ or Netbeans as a PHP editor
8. Copy and paste the code below to Notepad++ or any other PHP editor you have.
echo “This is just an experiment
“;
echo “Try other php code sample and see how it works!”;
?>
9. Save the file with any name and with .php extension. Example: filename.php
10. Save it on the drive where you installed the XAMPP, for example, in my case, it is on Drive C
Example Photo of XAMPP Folder in Drive C
See all 5 photos
11. open the XAMPP folder on Drive C or on the Drive where you installed it.
12. Find and open the “htdocs folder” inside the XAMPP Folder
Example Photo of “htdocs” folder inside the XAMPP Folder
See all 5 photos
13. Then click save. Make sure that the PHP fie is saved on the htdocs folder.
14. Now go to your browser
15. Then type this on the address bar: localhost/yourfilenamehere.php Replace “yourfilenamehere” with the file name you made when saving the file.
16. Hit enter.
The result must be like this:
See all 5 photos
If you have any clarification or question about the steps, please do not hesitate to ask in the comment section.
PHP E-Books
EBook Download Store php scripts website #NP-0016
Current Bid: $6.69
Learn PHP and MySQL PDF Ebook And Video Tutorials Course With MRR on CD
Current Bid: $8.43
PHP Video Tutorials
“Learn the PHP basics from 17 info packed video tutorials.” “On CD”
Current Bid: $1.99
PHP Programming Video Training tutorials CBT – 7+ Hrs
Current Bid: $4.99
Protector Glasses for All Users
“Gunner” MATTE BLACK VIDEO GAME GLASSES computer gaming mw3 ps3 sunglasses
Current Bid: $6.95
Gunnar Optiks Edge Advanced Computer Gaming Eyewear Glasses Onyx Brand New
Current Bid: $59.98
Computer reading glasses protect your eyes from LCD LED screens tv’s and games
Current Bid: $11.99
PHP Code Examples and Tutorials
How to become a PHP Developer: Learn and Earn
Steps on How to Program in PHP: A Beginner’s Guide on PHP Programming-Part 1
HTML Basics: Learn The Basics of HTML and Create Your Own Webpage on Your Browser
PHP Sample Codes On Function:How to make Function in PHP
PHP Code Example on Associative Array and Multidimensional Array
PHP Code Example on Numeric Array
PHP Code Example on Switch Statement:Making Choice and Cases
PHP code Example for if statement
PHP Code Example for if-else Statement With Notepad++
PHP Code Example on if else-if Statement
PHP Code Example on While Loop
PHP Code Example on Do-while Loop
PHP Code Example on Foreach Loop and For Loop