24
1st step of programming with PHP - Kanha Sahu PHP Language

First steps of programming with php

Embed Size (px)

Citation preview

Page 1: First steps of programming with php

1st step of programming with PHP- Kanha Sahu

PHP Language

Page 2: First steps of programming with php

About PHP

PHP is an acronym for "PHP: Hypertext Preprocessor"

PHP is a widely-used, open source scripting language

PHP is free to download and use

PHP files can contain text, HTML, CSS, JavaScript, and PHP code

PHP code are executed on the server, and the result is returned to the browser as plain HTML

PHP files have extension ".php"

PHP

PHP is an amazing and popular language!

• It is powerful enough to be at the core of the biggest blogging system on the web (WordPress)!• It is deep enough to run the largest social network (Facebook)!• It is also easy enough to be a beginner's first server side language!

Page 3: First steps of programming with php

Software - to debug, compile and execute php code on server/your PC

Xampp (Mac Os, Linux, Windows)

Wamp (Windows)

Lamp (Linux)

PHP Editor – to write a program

Adobe Dreamweaver

Eclipse

Notepad++

Aptana

Sublime

Browser – to view output/result

Mozilla Firefox

Google Crome

Internet Explorer

Safari

Comodo Dragon

Page 4: First steps of programming with php

Process of Execution PHP

Page 5: First steps of programming with php

Software

• API Tools or

Compiler

SRS

• System

Requirement

Specifications

Install

• Installation &

Configuration

Experiments

• Write a

Program

References

• Books, Tutorials

and Other Links

PHP

Page 6: First steps of programming with php

Windows

SRS

Cross Platform

Wamp

Xampp

Linux

Lamp

Page 7: First steps of programming with php

Mac

Linux

Widows

Xampp

PHP

Page 8: First steps of programming with php

About XAMPP

XAMPP is an AMP stack which lets you install Apache, MySQL and PHP in your computer together with some other useful software. It has been designed to provide you an easy installation experience. It’s free and available for Windows, Mac OS and Linux.

XAMPP is the most popular PHP development environment

XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.

XAMPP

About

• About Tool

Download

• Download XAMPP

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

Page 9: First steps of programming with php

Download XAMPP

https://www.apachefriends.org/download.html

https://sourceforge.net/projects/xampp/

XAMPP

About

• About Tool

Download

• Download XAMPP

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

Page 10: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 11: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 12: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 13: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 14: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 15: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 16: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 17: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 18: First steps of programming with php

Installation About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 19: First steps of programming with php

Configuration

To Start XAMPstart > All Programs > Xampp > Xampp Control Panel

Apache : click start to start apache, It is useful for PHP coding, execution

MySQL: click start to start MySQL, It is useful for MySQL connectivity with PHP

Where to write a CodeBy default Xampp installed in C:\xampp, if you change than you cam go to you drive:\folder drive:\folder\xampp\htdocs\<yourProjectFolder>

Example : C;\xampp\htdocs\basics

Creating PHP FileUse any text editor and write a php code and save it into your project folder with “.PHP” extension. Example “index.php”

How to Execute

First start xampp apache, write a basic PHP program and save it “<filename>.php”.

Open your browser and write in URL “localhost/<yourProjectFolder>/<yourProjectFolder>/<filename>.php”

Example : Mozzila Firefox -> localhost/basics/index.php

Press Enter.

About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other Links

XAMPP

Page 20: First steps of programming with php

Experiment

By using notepad or any other text editor write a basic program of PHP

About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other LinksSource Code - Input

PHP

Page 21: First steps of programming with php

Experiment

By using browser we can execute our PHP program

Just like c & c++, “//.. ”, “/* … */” is a comment notation

About

• About Tool

Download

• Download MinGW

Install

• Installation & Configuration

Experiments

• Write a Program

References

• Books, Tutorials and Other LinksResult - Output

PHP

Page 22: First steps of programming with php

Development of software applications is always a complex and a time consuming process. But thanks to those high-end PHP frameworks, that developing an agile application has now become easier and faster.

PHP Frameworks :When we use the terminology “Framework” we are more often talking about Web application framework . A web application framework is simply based on coding. If you are a programmer or a web developer that loves coding you often choose a Web application framework for your projects.

Content Management System(CMS):A CMS is a “Content management framework” and it is based on the modules rather than code. Anyone can handle a CMS as it doesn’t require any coding knowledge. Of course programmers can also choose a CMS as they can do their job faster.

PHP

FRAMEWORK NAME MVC PHP4 PHP5 MULTIPLE DB'S TEMPLATES

Yii

ThinkPHP

CakePHP

Codeigniter

Page 23: First steps of programming with php

PHP Frameworks :

Laravel

Phalcon

Symfony

Yii Framework

CakePHP

Codignator

Zend

CMS :

Druple

Joomla

Wordpress

Magento

TikiWiki

Wolf CMS

Page 24: First steps of programming with php

References

Downloads :

https://www.apachefriends.org/download.html

https://sourceforge.net/projects/xampp/

Official Site:

1. http://www.php.net/

Books:

http://www.w3schools.com/php/

http://www.tutorialspoint.com/php/index.htm

https://kaslab.blogspot.in/search/label/PHP

https://kaslab.blogspot.in/2015/03/mysql-notes.html

https://kaslab.blogspot.in/2015/03/css-notes.html

https://kaslab.blogspot.in/2015/03/html-notes.html

PHP