Home  >  Article  >  Backend Development  >  Mastering the basic knowledge of PHP - four kinds of delimiters

Mastering the basic knowledge of PHP - four kinds of delimiters

高洛峰
高洛峰Original
2017-02-18 16:30:412107browse

With nothing to do, I studied php, a completely different field from java and c#. PHP is (foreign name: PHP: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor"). For beginners who are learning PHP, You have to master the deployment of apache. The deployment of apache will be discussed later. Of course, there are now more one-click deployment tools for php, apache, and mysql, such as WAMP (windows, apache, mysql, php); there are many resources online. I won’t post relevant resource links here, in order to avoid the suspicion of gaining points; let’s get back to the point, let’s talk about the basic knowledge of PHP.

The four delimiters (what are delimiters?) can be understood as starting symbols and decomposition symbols. It is not difficult to understand why PHP needs four delimiters. First of all, PHP is an open source language, and its development was only developed after HTML, C#, and Java. There is no hatred without reason, and there is no love without reason. Although PHP is open source, someone still needs to pay attention to it. Most of the people who pay attention may be like us, practitioners of C# and Java. For new development languages , requires an acceptance process, so there are four delimiters on the PHP official website. Let’s learn them together, shall we? It’s not good to say it, please be brave and make a brick!

The standard writing method bb9bd6d87db7f8730c53cb084e6b4d2d is also the writing method recommended by the official website. The starting number 97af148c7a9cbd4b512ae035fd83ac34 is easier to understand here. In fact, it is similar to the starting symbol of html. For beginners here, it is recommended to use the Dreamwearm tool. The I don’t want to introduce too much about the definition of dynamic pages and static pages in HTML. The difference between static and dynamic is whether to request service. The writing method is as follows:

9711713cb9ed71f3d21594efa8b88326
    0c6dc11e160d3b678d68754cc175188a
    777bcd31d53423c38702e72005fcefef

Simple writing methodb26da186e11666e6dd99f28d6205715c , this writing method requires configuring the PHP configuration file, which is not recommended here. The specific configuration is to find the php.ini file in the PHP installation directory; how to find this file? As an experienced developer, this is not a problem for me. Generally, this file is stored in a folder with the con suffix, or directly in the root directory of the file, or the stupidest way is to add it to the header Search for *.ini in the folder, find the ini file and open it. Here to expand your knowledge, why do some configuration files end in ini? In fact, it is not difficult to understand. INI is the abbreviation of "initialization" in English. The INI file format is an informal standard for configuration files on certain platforms or software. It is composed of sections and keys and is commonly used by Microsoft. in Windows operating system. The file extension of this configuration file is mostly INI, hence the name. Open it with Notepad or editplus installed. Editplus has to be one of the must-have software for programmers, with powerful text editing functions. Search for short_open_tag in the file. I think the literal meaning of this word is easy to understand. Remove the semicolon at the beginning of this line and release the comment to modify short_open_tag=On.

    b7e830f7d65ef238d4a47598767eebfc

 

Asp style writing method 72637aecae1027e7d023ac098a170986, this is similar to the writing method of calling the background service page in asp. Those who have studied aspx.net should be familiar with this writing method, of course For this writing method to take effect, you also need to modify the php.ini configuration file. Search for asp_tags in this article, release the annotation, and modify asp_tags=On. The specific writing method is as follows:

    <%        
    echo &#39;锄禾日当午&#39;;    
    %>

Js style writing method842e8e9dd470ac0da5d8b75be3525bf22cacc6d41bbb37262a98f745aa00fbf0We can also understand it as script writing method. For the understanding of script, here is the following Let me tell you a joke: why some foreigners’ works are a bit stiff when translated into Chinese. Of course, this is just my point of view. After all, I am not an English professional. Script can be understood as inserting text anywhere in the text like a foot. It is easy to understand here why js can be written at the head of html, at the tail, or even in the middle. After talking so much, here are the specific writing methods

    <script language="php">        
    echo &#39;锄禾日当午&#39;;    
    </script>

To master more basic knowledge of PHP - four kinds of delimiters. For related articles, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn