PHP Introduction
PHP is a server-side scripting language.
Prerequisites
Before continuing your study, you need to have a basic understanding of the following:
- HTML
- CSS
If you wish to learn these topics first, please visit our Home to access these tutorials.
What is PHP?
- PHP (full name: PHP: Hypertext Preprocessor) is a general-purpose open-source scripting language.
- PHP scripts are executed on the server.
- PHP can be downloaded and used for free.
|
| PHP is easy to learn for beginners.**
**PHP 也为专业的程序员提供了许多先进的功能。 |
| --- | --- |
What is a PHP file?
- PHP files can contain text, HTML, JavaScript code, and PHP code
- PHP code is executed on the server, and the result is returned to the browser as plain HTML
- The default file extension for PHP files is .php.
What can PHP do?
- PHP can generate dynamic page content
- PHP can create, open, read, write, and close files on the server
- PHP can collect form data
- PHP can send and receive cookies
- PHP can add, delete, and modify data in your database
- PHP can restrict user access to some pages on your website
- PHP can encrypt data
With PHP, you are no longer limited to outputting HTML. You can output images, PDF files, and even Flash movies. You can also output arbitrary text, such as XHTML and XML.
Why use PHP?
- PHP runs on different platforms (Windows, Linux, Unix, Mac OS X, etc.)
- PHP is compatible with almost all servers currently in use (Apache, IIS, etc.)
- PHP provides broad database support
- PHP is free and can be downloaded from the official PHP resources:www.php.net
- PHP is easy to learn and runs efficiently on the server side