Basic php knowledge and basic php knowledge
PHP is a powerful server-side scripting language for creating dynamic and interactive sites. scripts are executed on servers ].
PHP files can contain text, HTML, CSS, and PHP code. The execution results on the server are returned to the browser in plain text.
Php can do many things:
1. generate dynamic page content
2. Create, open, read, write, delete, and close files on the server
3. Receive form data
4. Send and retrieve cookies
5. add, delete, and modify data in the database
6. restrict user access to some pages on the website
7. encrypt data
8. You can output HTML, images, PDF files, and even Flash videos. You can also output any text, such as XHTML and XML.
Php advantages:
Can run on a variety of platforms (Windows, Linux, Unix, Mac OS X, etc)
Compatible with almost all servers (Apache, IIS, etc)
Supports multiple databases
It is free, easy to learn, and can run efficiently on the server.
Php syntax:
PHP script with <? Php, starting with?> It can be placed anywhere in the document. The default file extension is ". php ".
<? Php // here is the PHP code?>
PHP files usually contain HTML tags and some PHP script code. PHP statements end with a semicolon (;)
<! DOCTYPE html> <body>
PHP supports three Annotations:
<! DOCTYPE html> <body> <? Php // This is a single line comment # this is also a single line comment/* This is a multi-line comment block it spans multiple lines */?> </Body>
PHP case sensitive
In PHP, all user-defined functions, classes, and keywords (such as if, else, and echo) are case insensitive.
However, in PHP, all variables are case sensitive.
<!DOCTYPE html>
/* Only the first statement displays the value of the $ color variable.
Because $ color, $ COLOR, and $ coLOR are considered as three different variables */
</body>