In PHP We can customize constants, and PHP also customizes some useful constants that will automatically change depending on where they are located. We call it Magic constants.
There are eight magic constants in PHP:
The current line number in
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output.
The output control function does not affect the
Code that uses foreach to manipulate an array in PHP
There are two ways to use foreach ():
foreach (Array_Name as $value) {statement;}
The array_name here is the name of the array you want to traverse, each time the value of the current element of
PHP program buffering, regardless of the circumstances in which PHP executes (CGI, Web server, etc.). This function sends all the output of the program so far to the user's browser.
The flush () function does not affect the caching mode of the
You can specify the callback type callback from PHP 5.4 with the callable type. This document uses callback type information on the same grounds.
Some functions such as call_user_func () or usort () can accept user-defined callback functions as
In some necessary scenarios we have to develop our own local PHP functions to meet some specific requirements, and the new function must exist in the PHP module. The simplest PHP module development is described below: Build your own Say_hello ($arg)
1.break jumps out of the code snippet and ends the loop.
The break statement terminates or the For loop, and continues execution of the current code following the loop (if any). Or
You can put a number after the discount keyword, explaining how to
This example uses only the execel2003. xls document, and if you are using a different version, you can save the format as "Execel 97-2003 Workbook (*.xls)", which is the. xls file type!
Function Description: Can only upload Excel2003 type of xls
The include (), require () statement contains and runs the specified file. The two structures are exactly the same on the containing file, and the only difference is the handling of the errors. The require () statement stops when the containing file
request = $request; } abstract function process (); function Forward ($resource) {//jump include ($resource); exit (0); } function Getrequest () {return $this->request; }}class Addvenuecontroller extends Pagecontroller {//The function of
The role of 1:global is to define global variables, but this global variable is not applied to the entire site, but is applied to the current page, including all files of include or require.
Summary: Global variables defined in the function body
The website uses the THINKPHP5 framework, the server uses the WDCP to build the
Then upload the public files to the/website/public_html directory.
Other inaccessible framework files are placed in the/website/directory
But when PHP
The switch statement is used to perform different actions based on different conditions. This article introduces the usage examples of switch statements in PHP, it involves the knowledge points of switch usage, and the friends who are interested in
smarty Common 20 variable operators * Use syntax: {Variable name
| Operator:}
* Capitalize---initial capital letter* Count_characters---Count of characters* Cat---connection string* Count_paragraphs---Calculation of the number of paragraphs* Count_
I know that break in PHP jumps out of the loop, so what does it mean to add 2 or 3 after break? For example: Break 2; Excuse me, what do you mean by this? and break; What's the difference???? Can you give me an example? Thank you thank thank you
Properties
type
whether you must
Default Value
Description
Name
String
Yes
N/A
The name of the loop
Loop
[$variable _name]
Yes
N/A
Variable name that determines the number of
This article mainly introduces the PHP implementation of bulk emptying delete all the contents of the specified folder method, involving PHP based on a custom function recursive call implementation to delete files in the specified directory and
Expressions are the most important cornerstone of PHP. In PHP, almost anything written is an expression. The simplest but most precise way to define an expression is "anything that has value." This article mainly introduces the description of the
This article mainly introduces the solution to the problem of Php-fpm.service not found, the article introduces in detail the idea and process of solving this problem, share it to everyone, if there is the same problem of friends do not have to find
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service