140 likes | 307 Views
Technical Review - PHP. 20021085 Jang Jaeseok. Overview. Introduction What is PHP? History of PHP What can do with PHP? Advantages of PHP PHP syntax Language syntax Web related variables Examples. Introduction -What is PHP?. Professional HTML Processor (PHP3) Scripting Language
E N D
Technical Review- PHP 20021085 Jang Jaeseok
Overview • Introduction • What is PHP? • History of PHP • What can do with PHP? • Advantages of PHP • PHP syntax • Language syntax • Web related variables • Examples
Introduction-What is PHP? • Professional HTML Processor (PHP3) • Scripting Language • Server-side, • HTML-embedded • Cross-platform (UNIX, LINUX, Windows) • APM? • Apache + PHP + MySQL • Web Server & PHP & DB
Introduction- History of PHP • Personal Home Page Tools (PHP/FI) • By Rasmus Lerdorf in 1994 • Improved Version • PHP3 • PHP4 Zend • Additional function • Improve processing speed • Popular script language • Used by about 200,000 sites
Introduction- What can do with PHP? • All functions of CGI are available (C,Perl) • Get data with HTML • Active Web page • Control cookie • Advanced functions • Active GIF image • HTTP certification • File uploading
Introduction- Advantages of PHP • Linkage to DB • MySQL, dBase, mSQL, etc. • Connect with another services • IMAP, SNMP, HTTP, POP3, etc • Raw socket • Make possible using undefined protocol • Simple coding skill • Type Automation of variable • Similarity with other language -> C++
PHP syntax- Language syntax • Embedded in HTML ( between <?, ?> ) • Variables • Type automation • Dynamic variable • Type casting • Ex) $var = (int) ”123abc”; • Control structures • If, switch, do/while, for
PHP syntax- Web related variables • GET, POST, cookie, environment variables • <FORM ACTION="test.php3" METHOD="POST"> <INPUT TYPE=text NAME=var> </FORM> • $var is set to the input of text field • PHP Information • <? • mysql_connect('localhost','',''); • phpinfo(); • ?>
Examples- Showing Browser and IP Address • <HTML> <HEAD><TITLE>PHP Example</TITLE></HEAD> <BODY> You are using <? echo $HTTP_USER_AGENT ?><BR> and coming from <? echo $REMOTE_ADDR ?> </BODY> </HTML>
Examples- Form Handling Input Result