Day 1 PHP Introduction
Day 1 PHP Introduction
Day 1 PHP Introduction
PHP Introduction
Geshan Manandhar
Developer,
Young Innovations Pvt. Limited
www.geshanmanandhar.com
GeshanManandhar.com 1
What is PHP
► PHP, which stands for “PHP: Hypertext
Preprocessor”.
► PHP is a widely-used Open Source general-
purpose scripting language.
► It is especially suited for Web development
and can be embedded into HTML.
► It was originally created by Rasmus Lerdorf
in 1995.
GeshanManandhar.com 2
More About PHP
► PHP is free software released under the PHP
License.
► PHP typically runs on a web server that
takes PHP as input and gives out HTML
pages as output.
► PHP is installed on more than 20 million
websites and 1 million web servers.
► PHP has a syntax similar to C and Java.
► The current version of PHP is 5.2.x.
GeshanManandhar.com 3
Features of PHP
► Itis Free and Open
source.
► Easy to learn but hard
to master.
► Connects with 20+
databases.
► Version 5+ supports
OOP.
► Multi-platform
compatible.
GeshanManandhar.com 4
The LAMP Stack
GeshanManandhar.com 6
What will you learn
GeshanManandhar.com 7
Software required to run PHP on
Windows
► XAMPP
X- for all platforms (windows, linux…)
A- Apache web server
M- MYSQL with PHPMyAdmin
P- PHP
P- Perl
► That’s
all you need you must have good IDE
to code.
GeshanManandhar.com 8
IDEs for PHP development
► IDE – Integrated Development Environment
Adobe Dreameweaver
Notepad++
Zend Development Studio
PHP Eclipse
GeshanManandhar.com 9
Ways to code your PHP website or
web Application
Source: http://geshan.blogspot.com
GeshanManandhar.com 10
Basic PHP Program
► Helloworld
► X:\xampp\htdocs\my_folder\first_prog.php
GeshanManandhar.com 13
Another simple program
► Simple price calculation
<?php
$qty = 5;
$price = 10000;
$amt = $qty*$price;
GeshanManandhar.com 15