0% found this document useful (0 votes)
21 views

Brief Introduction of PHP: - Xue Wu

PHP is a widely used scripting language for web development that can be embedded into HTML code. It runs on web servers and acts as a filter, improving performance over time. PHP allows for database connectivity, object oriented programming, and is compatible with technologies like MySQL. It is used for rapid application development and has competitors like ASP and JSP. Security concerns when using PHP include SQL injections, cross-site scripting, and directory/file access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Brief Introduction of PHP: - Xue Wu

PHP is a widely used scripting language for web development that can be embedded into HTML code. It runs on web servers and acts as a filter, improving performance over time. PHP allows for database connectivity, object oriented programming, and is compatible with technologies like MySQL. It is used for rapid application development and has competitors like ASP and JSP. Security concerns when using PHP include SQL injections, cross-site scripting, and directory/file access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Brief Introduction

of PHP
---Xue Wu

PHP (Personal Home Page)


Web development
1. can be embedded into HTML
2. generally runs on a web server
3. 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:

Microsofts Active Server Page


Sun Microsystems Java Server Page
Mode_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:


echo
Can output multiple strings:
<?
$a="hello";
$b="world";
echo "a","b";
?>
---result: hello world

Print
Can only output single string:
<?
$a="hello";
$b="world";
print "a","b";
?>
---Parse error: parse error in
d:adminmyphphometest.p
hp3 on line 54

PHP---Security

1.
2.
3.
4.

To prevent from damaging on your website


Error Report
SQL Injections
Cross Site Scripting
Session Security

PHP---Security
5. Directory traversal
6. Cross-site request forgery
7. 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/phpsecurity/page9 PHP Security, last retrieved
on 2009-3-1

You might also like