PHP = Pre-processor Hypertext PHP, a server side scripting languages widely (nearly 82% of the worlds websites are developed using PHP!) used in developing dynamic and interactive webpages.
Advantages of PHP
- ——Dynamic content.
- —Computational capability.
- —Database and file system access.
- —Network access (from the server only).
- —Built-in libraries and functions.
- —Known platform for execution (as opposed to client-side, where the platform is uncontrolled.)
- —Security improvements
Developed by Rasmus Lerdorf in 1994
It is a powerful server-side scripting language for creating dynamic and interactive websites.
It is an open source software, which is widely used and free to download and use (PHP is FREE to download from the official PHP resource: www.php.net).
It is an efficient alternative to competitors such as Microsoft’s ASP.
It is a powerful server-side scripting language for creating dynamic and interactive websites.
It is an open source software, which is widely used and free to download and use (PHP is FREE to download from the official PHP resource: www.php.net).
It is an efficient alternative to competitors such as Microsoft’s ASP.
PHP is perfectly suited for Web development and can be embedded directly into the HTML code.
The PHP syntax is very similar to JavaScript, Perl and C.
PHP is often used together with Apache (web server) on various operating systems. It also supports ISAPI and can be used with Microsoft’s IIS on Windows.
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
The PHP syntax is very similar to JavaScript, Perl and C.
PHP is often used together with Apache (web server) on various operating systems. It also supports ISAPI and can be used with Microsoft’s IIS on Windows.
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
PHP files have a file extension of “.php”, “.php3”, or “.phtml”
PHP files can contain text, HTML tags and scripts
PHP files are returned to the browser as plain HTML
PHP files can contain text, HTML tags and scripts
PHP files are returned to the browser as plain HTML
What you need to develop PHP Application:
1. Install Apache (or IIS) on your own server, install PHP, and MySQL OR
2. Install Wampserver2 (a bundle of PHP, Apache, and MySql server) on your own server/machine
1. Install Apache (or IIS) on your own server, install PHP, and MySQL OR
2. Install Wampserver2 (a bundle of PHP, Apache, and MySql server) on your own server/machine
Sample PHP Syntax
<?php
echo “Hello Class of 2011. This is my first PHP Script”;
echo “<br />”;
print “<b><i>What have you learnt and how many friends have you made?</i></b>”;
echo “<br /><a href=’PHP I-BSIC.ppt’>PHP BASIC</a>”;
?>
echo “Hello Class of 2011. This is my first PHP Script”;
echo “<br />”;
print “<b><i>What have you learnt and how many friends have you made?</i></b>”;
echo “<br /><a href=’PHP I-BSIC.ppt’>PHP BASIC</a>”;
?>
Steps to execute PHP Programs
1. Install WAMP server or XAMPP or LAMP
2. Create a PHP file (exa: a1.php)
3. Start WAMP Server (wait for WAMP server icon on system tray turns into green color, which means server is running properly!)
4. Place your newly created php file in the following location : C:\WAMP\WWW\yourwebfolder
5. Now, open the browser and type the url in the address bar as : http://localhost/yourwebfolder/a1.php
That’s it, now you can able to see your php program output!