Getting started with PHP?
See this list for the required tools:
- 1st thing you will need is a place to write your code, i.e., a text editor.
You probably already have notepad on your computer but it is recommended that you use a better editor which can highlight your code.
2 very good editors are ConTEXT and Notepad++.
- 2nd thing you need, is a place to test the code that you write:How to do that? Go install the software ‘XAMPP‘ from here for windows or choose your Operating System from here.
If there are multiple options, choose ‘Installer‘ or ‘EXE‘.XAMPP will turn your computer into a web server so that you can test your code right away.
So, download and install it, open ‘XAMPP Control Panel‘ from your start menu and ‘Start’ the services ‘Apache‘ and ‘MySql‘
To test that you have installed it correctly, open your browser and type ‘localhost‘ or ‘127.0.0.1‘ into the address bar and press enter. Your XAMPP servers homepage should load.
- How to run PHP code?
Just save your php file with ‘.php‘ extension into the ‘htdocs’ folder of your XAMPP installation.
Typically it is ‘C:\xampp\htdocs‘Then in your browser, type ‘localhost/filename.php ‘ and press enter.
If you want to place your PHP files in folders, then for running, just type ‘localhost/FolderName/FileName.php’
e.g.,localhost/Learning/MyFirstPHP.php or ’127.0.0.1/Learning/MyFirstPHP.php’
Go ahead and now start practicing PHP, good luck.
The following two tabs change content below.
Lalit is a technology enthusiast, a programming lover and currently an Android fan.
Latest posts by Lalit Mali (see all)
- Rank Pages in a Directory by Occurrence of a Particular Word in them – Java Data Mining - October 16, 2012
- Java Data Mining: Number of occurrences of a word in a file - October 15, 2012
- Calculate factorial of a number using C++ Recursive function - October 14, 2012