Upload
geshan-manandhar
View
224
Download
0
Embed Size (px)
Citation preview
8/14/2019 01PHP Introduction
1/15
GeshanManandhar.comGeshanManandhar.com 11
Day 1Day 1
PHP IntroductionPHP IntroductionGeshan ManandharGeshan Manandhar
Developer,Developer, Young Innovations Pvt. Limited Young Innovations Pvt. Limited
www.geshanmanandhar.comwww.geshanmanandhar.com
8/14/2019 01PHP Introduction
2/15
GeshanManandhar.com 2
What is PHPWhat is PHP
PHP, which stands for PHP: HypertextPHP, which stands for PHP: HypertextPreprocessor.Preprocessor.
PHP is a widely-used Open SourcePHP is a widely-used Open Sourcegeneral-purpose scripting language.general-purpose scripting language.
It is especially suited for WebIt is especially suited for Webdevelopment and can be embedded intodevelopment and can be embedded into
HTML.HTML. It was originally created by RasmusIt was originally created by Rasmus
Lerdorf in 1995.Lerdorf in 1995.
8/14/2019 01PHP Introduction
3/15
GeshanManandhar.com 3
More About PHPMore About PHP PHP is free software released under thePHP is free software released under the
PHP License.PHP License. PHP typically runs on a web server thatPHP typically runs on a web server that
takes PHP as input and gives out HTMLtakes PHP as input and gives out HTMLpages as output.pages as output. PHP is installed on more than 20 millionPHP is installed on more than 20 million
websites and 1 million web servers.websites and 1 million web servers. PHP has a syntax similar to C and Java.PHP has a syntax similar to C and Java. The current version of PHP is 5.2.x. The current version of PHP is 5.2.x.
8/14/2019 01PHP Introduction
4/15
GeshanManandhar.com 4
Features of PHPFeatures of PHP It is Free and OpenIt is Free and Open
source.source. Easy to learn butEasy to learn but
hard to master.hard to master. Connects with 20+Connects with 20+databases.databases.
Version 5+ supportsVersion 5+ supportsOOP.OOP.
Multi-platformMulti-platformcompatible.compatible.
8/14/2019 01PHP Introduction
5/15
GeshanManandhar.com 5
The LAMP Stack The LAMP Stack
Apache is the web server.Apache is the web server. MYSQL is the database server.MYSQL is the database server. PHP is the backend coding language.PHP is the backend coding language.
8/14/2019 01PHP Introduction
6/15
GeshanManandhar.com 6
PHP TrendPHP Trend
8/14/2019 01PHP Introduction
7/15
GeshanManandhar.com 7
What will you learnWhat will you learn
8/14/2019 01PHP Introduction
8/15
GeshanManandhar.com 8
Software required to run PHP onSoftware required to run PHP onWindowsWindows
XAMPPXAMPPX- for all platforms (windows, linux)X- for all platforms (windows, linux)A- Apache web serverA- Apache web serverM- MYSQL with PHPMyAdminM- MYSQL with PHPMyAdminP- PHPP- PHPP- PerlP- Perl
Thats all you need you must have Thats all you need you must havegood IDE to code.good IDE to code.
8/14/2019 01PHP Introduction
9/15
GeshanManandhar.com 9
IDEs for PHP developmentIDEs for PHP development
IDE Integrated DevelopmentIDE Integrated DevelopmentEnvironmentEnvironment
Adobe DreameweaverAdobe DreameweaverNotepad++Notepad++Zend Development StudioZend Development StudioPHP EclipsePHP Eclipse
8/14/2019 01PHP Introduction
10/15
GeshanManandhar.com 10
Ways to code your PHP websiteWays to code your PHP websiteor web Applicationor web Application
Source: http://geshan.blogspot.com
8/14/2019 01PHP Introduction
11/15
GeshanManandhar.com 11
Basic PHP ProgramBasic PHP Program Hello worldHello world X:\xampp\htdocs\my_folder\first_prog.phpX:\xampp\htdocs\my_folder\first_prog.php
Add some complication:
8/14/2019 01PHP Introduction
12/15
GeshanManandhar.com 12
Delimiter, tags andDelimiter, tags andcommentscomments
- long tag - long tag - short tag - short tag - ASP style not preferred - ASP style not preferred
//php tag//php tag - uncommon - uncommon
- shortcut for echo - shortcut for echo
//line comment//line comment
/*/*block commentblock comment*/*/
8/14/2019 01PHP Introduction
13/15
GeshanManandhar.com 13
PHP Data TypesPHP Data Types
BooleanBoolean IntegerInteger
FloatFloatStringStringArrayArray
ObjectsObjects
8/14/2019 01PHP Introduction
14/15
GeshanManandhar.com 14
Another simple programAnother simple program
Simple price calculationSimple price calculation?>
8/14/2019 01PHP Introduction
15/15
GeshanManandhar.com 15
Lets Install XAMPPLets Install XAMPP
Lets install XAMPP and run 2 programsLets install XAMPP and run 2 programsAsk questions.Ask questions.