01 Php Introduction

3,692 views

Published on

Introduction to PHP.

Published in: Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,692
On SlideShare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
0
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide

01 Php Introduction

  1. 1. Day 1 PHP Introduction Geshan Manandhar Developer, Young Innovations Pvt. Limited www.geshanmanandhar.com
  2. 2. What is PHP <ul><li>PHP, which stands for “PHP: Hypertext Preprocessor”. </li></ul><ul><li>PHP is a widely-used Open Source general-purpose scripting language. </li></ul><ul><li>It is especially suited for Web development and can be embedded into HTML. </li></ul><ul><li>It was originally created by Rasmus Lerdorf in 1995. </li></ul>
  3. 3. More About PHP <ul><li>PHP is free software released under the PHP License. </li></ul><ul><li>PHP typically runs on a web server that takes PHP as input and gives out HTML pages as output. </li></ul><ul><li>PHP is installed on more than 20 million websites and 1 million web servers. </li></ul><ul><li>PHP has a syntax similar to C and Java. </li></ul><ul><li>The current version of PHP is 5.2.x. </li></ul>
  4. 4. Features of PHP <ul><li>It is Free and Open source. </li></ul><ul><li>Easy to learn but hard to master. </li></ul><ul><li>Connects with 20+ databases. </li></ul><ul><li>Version 5+ supports OOP. </li></ul><ul><li>Multi-platform compatible. </li></ul>
  5. 5. The LAMP Stack <ul><li>Apache is the web server. </li></ul><ul><li>MYSQL is the database server. </li></ul><ul><li>PHP is the backend coding language. </li></ul>
  6. 6. PHP Trend
  7. 7. What will you learn
  8. 8. Software required to run PHP on Windows <ul><li>XAMPP </li></ul><ul><ul><li>X- for all platforms (windows, linux…) </li></ul></ul><ul><ul><li>A- Apache web server </li></ul></ul><ul><ul><li>M- MYSQL with PHPMyAdmin </li></ul></ul><ul><ul><li>P- PHP </li></ul></ul><ul><ul><li>P- Perl </li></ul></ul><ul><li>That’s all you need you must have good IDE to code. </li></ul>
  9. 9. IDEs for PHP development <ul><li>IDE – Integrated Development Environment </li></ul><ul><ul><li>Adobe Dreameweaver </li></ul></ul><ul><ul><li>Notepad++ </li></ul></ul><ul><ul><li>Zend Development Studio </li></ul></ul><ul><ul><li>PHP Eclipse </li></ul></ul>
  10. 10. Ways to code your PHP website or web Application Source: http://geshan.blogspot.com
  11. 11. Basic PHP Program <ul><li>Hello world </li></ul><ul><li>X:xampphtdocsmy_folderfirst_prog.php </li></ul><?php //starting delimeter echo “Hello world”; //print hello world ?> Add some complication: <?php $message = “Hello world”; print $message; ?>
  12. 12. Delimiter, tags and comments <ul><li><?php //php code ?> - long tag </li></ul><ul><li><? ?> - short tag </li></ul><ul><li><% %> - ASP style not preferred </li></ul><ul><li><script language=&quot;php&quot;>         //php tag     </script> - uncommon </li></ul><ul><li><?= ?> - shortcut for echo </li></ul><ul><li>//line comment </li></ul><ul><li>/* block comment */ </li></ul>
  13. 13. PHP Data Types <ul><li>Boolean </li></ul><ul><li>Integer </li></ul><ul><li>Float </li></ul><ul><li>String </li></ul><ul><li>Array </li></ul><ul><li>Objects </li></ul>
  14. 14. Another simple program <ul><li>Simple price calculation </li></ul><ul><li><?php </li></ul><ul><li>$qty = 5; </li></ul><ul><li>$price = 10000; </li></ul><ul><li>$amt = $qty*$price; </li></ul><ul><li>echo “Rs. “.number_format($amt, 2); </li></ul><ul><li>?> </li></ul>
  15. 15. Lets Install XAMPP <ul><li>Lets install XAMPP and run 2 programs </li></ul><ul><li>Ask questions. </li></ul>

×