130 likes | 275 Views
Introduction to PHP. Sergey Gorstka Fastw3b. Partnership for Peace People Helping People Power Hybrid Package Hypertext Processor. What does PHP stand for?. What is PHP?. PHP is a server-side scripting language PHP supports many databases PHP is an open source software
E N D
Introduction to PHP Sergey Gorstka Fastw3b
Partnership for Peace People Helping People Power Hybrid Package Hypertext Processor What does PHP stand for?
What is PHP? • PHP is a server-side scripting language • PHP supports many databases • PHP is an open source software • PHP is free to download and use
When was PHP designed? • Just before Joomla was released • In 19th century • Right after Joomla was released • In 1994.
Who designed PHP? • Eminem • Johnny English • Rasmus Lerdorf • Bruce Willis
Get a server Install PHP Create some php file (index.php) Write your code Upload it Execute the file Don’t forget about security First application
<?php/** File: hellojdayuk.php* Session: Introduction to PHP* Event: Joomla Day UK* Date: 24 September 2011* Author: Sergey Gorstka*/// Hello World exampleecho “Hello Joomla Day UK 2011 People!”;?> Example 1
Example 2 <?php/** File: hellojdayuk.php* Session: Introduction to PHP* Event: Joomla Day UK* Date: 24 September 2011* Author: Sergey Gorstka*/ ?><html …><head> … </head> <body style=”background:#eee;”><h1 style=”color:navy;text-align:center;”> <?php // Hello World example echo “Hello Joomla Day UK 2011 People!”; ?></h1></body></html>
A class is a collection of variables and functions working with these variables. Variables are defined by var and functions by functions. <?php class Cart { var $items; function add_item(…) { … } function remove_item(…) { … } } ?> PHP class
JText JRequest JArrayHelper JURI JHTML JMenu JRouter JApplication JFactory Helpful Joomla! PHP classes
Ask a question Understand books, forums, articles, videos Read the code Tweak templates Tune modules Alter component views Go to the next level Where you can use basic PHP knowledge?
Thank you for your attention! Special thanks to Fastw3b team and Gregory Palchikovsky You can always reach me atceo@fastw3b.net Please send your questions/comments/ideas!