In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you the basic knowledge about php. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
What is PHP?
PHP (PHP: Hypertext Preprocessor, abbreviation for hypertext preprocessor) is a widely used open source, server-based scripting language that can be embedded in HTML for generating dynamic web pages, especially suitable for WEB development.
When the client makes a request to the server program, the web server according to the page corresponding to the request response, when the page contains the php script, the server will send the PHP interpreter for interpretation and execution, and then transmit the generated html code back to the client, and the client browser interprets the html code, and finally forms a page in web format.
Execution mode
The PHP code is included in a special start and Terminator to allow the script of the web page to enter and exit "PHP mode". Other scripts written in C or Perl require a large number of commands to write programs to output HTML, while writing a HTML script in PHP simply embeds some code to complete the operation (for example, some text is output in this case).
Unlike Java on the client side, the PHP code runs on the server side. If code similar to the previous example is established on the server, the client can receive the result after running the script, but they have no way of knowing how the code behind it works. You can even set up the web server to let PHP handle all the HTML files so that users don't know what the server is doing.
PHP runtime environment installation
Install PHP environment Linux+Apache+MySQL+PHP under Linux and PHP environment WAMP under Windows
2. Integrated environment *: Wamp
Characteristics of PHP
Is an open source, server-side scripting language.
Independent of the operating system, it can run on almost all systems.
Support most servers, such as Apache,IIS.
Support a large number of databases, mainly Access\ MySQL\ SQL Server.
You can create an image.
... ...
There are also some other features described in detail later in the advanced technology.
Large websites we know, such as Xunlei and Xinliang Weibo, all use PHP programs.
The structure of Cpact S and Bhand S
Clock S (Client/Server) structure, which is the well-known client phase server structure. It is a software system architecture, through which we can make full use of the advantages of the hardware environment at both ends, distribute the tasks to the Server end of the Client reasonably, and reduce the communication overhead of the system. At present, most application software systems are two-tier structure in the form of Client/Server.
Bounce S (Browser/Server) structure is browser phase server structure. With the rise of Internet technology, it is a kind of structure that changes or improves the structure of Cpact S. In this structure, the user work interface is implemented through the WWW browser, and very little transaction logic is implemented in the front end (Browser), but the main transaction logic is implemented in the server side (Server). This greatly simplifies the load of the client computer, reduces the cost of system maintenance and upgrade, and reduces the overall cost of users.
Integrated development environment
WAMP
Apache+Mysql/MariaDB+Perl/ PHP/Python under Windows, a group of open source software commonly used to build dynamic websites or servers, are independent programs themselves, but because they are often used together, they have a higher and higher degree of compatibility and form a powerful Web application platform.
MAMP
MAMP PRO on Apple is a professional version of the classic local server environment os x software. The initials MAMP stands for Macintosh, Apache, and MySQL PHP on Apple's OSX system. As the name implies, you should know the power of MAMP! MAMP includes Apache server, PHP installation kit and MySQL installation kit.
Markup style of PHP
This is the markup style recommended by PHP. The server administrator cannot disable this style of markup.
Convenient mixed arrangement with HTML
This is true.This is false.
PHP will directly output any non-PHP code in the closing tag as in the next opening tag. When you need to output a large amount of text, exiting PHP parsing mode is more efficient than printing all text using functions such as echo () or print () or.
semicolon
PHP uses semicolons to separate simple statements. Compound statements mark blocks of code with curly braces, such as conditional tests or loops, without a semicolon after the curly braces. Unlike other languages, the semicolon before the closing parenthesis (? >) in PHP is not required.
White space newline character
Generally speaking, whitespace characters don't matter in PHP. You can expand a statement into any line, or compact the statement on one line. You can take advantage of this flexible format to make your code more readable (through permutation, allocation, indentation, etc.). It is not recommended that some lazy programmers use this free format to create code that cannot be read at all.
Comments on the program
PHP supports comments in the Shell script style of C and C++, as follows:
/ / single-line comments
/ *. / Multiline comments (Note: cannot be nested)
# script comments
These are the basic knowledge of php shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.