brief introduction of php - uppsala university · php_xue.ppt author: kjell orsborn created date:...

10
Brief Introduction of PHP ---Xue Wu

Upload: trananh

Post on 24-May-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Brief Introductionof PHP

---Xue Wu

PHP (Personal Home Page)

Web development 1. can be embedded into HTML 2. generally runs on a web server3. Act as a filter: (from PHP 4, performance improved by

complied input as bytecode) 4. widely used and free charge

PHP-Characteristics Database Connected (eg. PHP&MySQL) Compatible Object Oriented Programming

PHP--- example Grammatical:---Can be both embedded into HTML and

separated from HTML code: <? . . . ?>

<?php . . . ?> (XML passers )<script language="php"> . . . </script><% . . . %>

PHP---Usage Competitor: Microsoft’s Active Server PageSun Microsystems’ Java Server PageMode_perl

Rapid Application Development (RAD)Cake PHP, PRADO, Symfony, Codelgniter

PHP--- example Annotation: /*C style, Multiple lines*/// C style one line#Unix Style

PHP--- Interaction with THML: echoCan output multiple strings:<?

$a="hello";$b="world";echo "a","b";?>

---result: hello world

PrintCan only output single string:<?

$a="hello";$b="world";print "a","b";?>

---Parse error: parse error ind:adminmyphphometest.php3 on line 54

PHP---Security To prevent from damaging on your website1. Error Report2. SQL Injections3. Cross Site Scripting4. Session Security

PHP---Security

5. Directory traversal6. Cross-site request forgery7. Remote file inclusion

Reference http://en.wikipedia.org/wiki/PHP last

retrieved on 2009-2-28 http://www.phpchina.com/?action_thematici

nfoview_itemid_34132.html “PHP tutorial”,last retrieved on 2009-2-28

http://www.phpfreaks.com/tutorial/php-security/page9 “PHP Security”, last retrievedon 2009-3-1