Dynamic website? The data on the page comes from the database (or other data sources). when a user needs to request a data, our application language (PHP) what is PHP displayed to users after it is obtained in the database? Programming language. PHP: Early PHP personal HomePage personal webpage of HyperText Preprocessor. A tool that can get database resources in html code. To create a dynamic website. View Data source: dynamic website? The data on the page comes from the database (or other data sources). when a user needs to request a data, our application language (PHP) is obtained from the database and then displayed to the user. Static website? The website content is saved in the HTML file. It cannot be changed. you can only modify html. What can PHP do? Server script: a website is a server script. If php acts as a server script, a web server and web browser are required to work. Command line script: php code can be run in the command line. Sometimes we need to regularly back up the database, create a session directory, and other functions, you can use the PHP command line to complete. Php executed on the command line does not require a web server or a web browser. For example, the command line script can also receive parameters: the variable $ argv (all parameters) and $ argc (number of parameters) are used to receive the parameters.
It even supports desktop programs: PHP basic syntax: PHP markup: why should I use php markup: because php files can not only use PHP syntax, but also directly write html, script. This means that we need to identify the parts in a file that need to be processed using php. Php has two standard labels: Script
PHP has two nonstandard short tags: It is not recommended. if you need to use it, you need to set it in the php configuration file: short_open_tag:
Asp style tag: <%>. it is not recommended. you can enable it by configuring asp_tags:
There is a recommended practice: when the entire document is a php document or the php label is the last part of the document, you can omit the end mark. Statement terminator; in principle, each statement should follow one; end as a statement. But there is a special case: The End mark of Php, which contains a quotation mark. This means that if we have an end mark, the last php statement can omit the semicolon. For example:
But if there is no end mark, no:
Note: only php code can be commented out.
Line comments // # Block comments/**/example of comments used:
We recommend that you write comments.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.