Page Stats
Visitor: 747
How to Install PHP Software
In order to develop and run PHP Web pages vital components need to be installed on your computer system.
- Web Server PHP will work with virtually all the Web Servers, including Microsoft's Internet Information Server (IIS) but most often used is freely available Apache Server.
- Database PHP will work with virtually all the database softwares, including Oracle, MSSQL but most commonly used is freely available MySQL database.
PHP available Softwares are:
- WAMP Server (Windows, Apache, MySQL, PHP)
- LAMP Server (Linux, Apache, MySQL, PHP)
- MAMP Server(Macintosh, Apache, Mysql and PHP)
- XAMPP Server - X meant for Operating System, Apache, MySQL, PHP, and PERL.
After software installation you can check whether it is installed successfully or not by written the 'Hello World' example.
Example 1: To print a Message, "Hello World"
<html> <body> <?php echo "Hello World"; ?> </body> </html>
To save the PHP file save in the 'htdocs' folder which is in 'c:\xampp\', mention any filename with the '.php' extension, To run the PHP file open browser type the URL 'http://localhost/filename.php' or 'http://127.0.0.1/filename.php'
Code Explanation:
- A PHP scripting block always starts with <?php and ends with ?>. It can be placed almost anywhere in an HTML document.
- Echo statment is use for output.
- A semicolon (;) is use at the end of each statement.