PHP
|
副檔名: | .php |
開發者: | PHP Group |
瀏覽次數: | 653380 |
更新: | 2010-11-21 12:38:49 |
Hex: | 3C 3F 70 68 70 |
ASCII: | <?php |
|
|
PHP is an open source scripting language that is usually used for web development, the name PHP comes from the use of a acronym for Hypertext Preprocessor.
A description of what PHP does is a page that contains html, embedded in to that is the PHP Code which usually outputs something, an example of this is.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
echo "Hello Filefact user !";
?>
</body>
</html>
If this code was saved into a PHP file using a text editor then uploaded to a server and opened in a browser the user would see the text "Hello Filefact user!".
PHP code is executed serverside where it generates the html that the user can see when the page is viewed in a browser.
PHP can do most things that are possible using CGI which range from collecting data to generating dynamic pages, many modern Discussion forum softwares use PHP becuase it uses less resources when compared with Perl variants.
For Serverside scripting with PHP a PHP parser is needed, the Server and of course the browser to see the outputted code.
PHP runs on most major operating systems and web servers, it is possible for testing purposes to install a Webserver that has PHP installed for testing and developing PHP projects. PHP also supports many databases which is useful when using applications such as Forums that require the use of a database.