Introduction to PHP


Basic knowledge you should have

Before continuing, you need to have a basic understanding of the following knowledge:

  • HTML

  • CSS

If you want to learn these projects first, you can visit html/ in the PHP Chinese website css online manual or html/css online video tutorial.


What is PHP?

  • PHP (full name: PHP: Hypertext Preprocessor, that is, "PHP: Hypertext Preprocessor") is a general open source scripting language.

  • PHP scripts are executed on the server.

  • PHP is free to download and use.

lampPHP is simple and easy to learn for beginners.

PHP also provides many advanced features for professional programmers.



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 results are returned to the Browsers

  • 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, Modify data in your database

  • PHP can restrict users from accessing some pages on your website

  • PHP can encrypt data

With PHP, you are no longer limited to outputting HTML. You can export 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 works with almost all current Compatible with the server being used (Apache, IIS, etc.)

  • PHP provides extensive database support

  • PHP is free and open source

  • PHP is easy to learn and runs efficiently on the server side