function Sendheader ($num, $rtarr = null) {
static $SAPI = null;
if ($sapi = = = null) {
$sapi = Php_sapi_name ();
}
return $SAPI + +;
Look at the PW source code to find the SetHeader () function using the static keyword, it is strange, has not been
Many students will feel dizzy when learning the recursive function, unable to understand the principle of recursive function and operating mechanism, this article will give you a detailed explanation of the operation mechanism and application of
In the process of using phpexcel, you will inevitably encounter a variety of problems, especially in the import Excel table, we always can not get the desired Excel data from the editor, such as the following:
Obviously, I actually just want the
ARRAY_UNSHITF () inserts one or more cells at the beginning of the array
functionThe function inserts the incoming cell at the beginning of the specified arrayNote that the unit is inserted as a whole, so incoming cells will remain in the same
The original string 1,2,3,4,5,6,
Remove the last character "," and the end result is 1,2,3,4,5,6
The code is as follows:
$str = "1,2,3,4,5,6,";$newstr = substr ($str, 0,strlen ($STR)-1);Echo $newstr;Echo 1,2,3,4,5,6The system comes with a function
Array_search () finds the given value in the array and returns the corresponding key name
functionThe function looks for a given value in the specified array, and returns the key name of the value if it is found otherwise false."Scope of Use"php4>=4
The Array_diff_key () function calculates the difference set of an array using the key name comparison
functionThe function will return an array,The array contains all the values in array1 but not the key names in any of the other parameter arrays."
Array_shift () move a cell at the beginning of the divisor group
functionThe function will pop up and return the first cell of the array, and then subtract the length of the array by oneAll numeric key names are changed to zero-based
Array_unique () to move duplicate values in an array
functionThe function returns a new array with no duplicate values based on the specified array, and the key name remains unchangedThe function first sorts the value as a string, and then retains
The Array_diff_ukey () function uses a callback function to compare the difference set of an array to a key name
functionThe function will return an array,The array contains all the values in array1 but not the key names in any of the other
Array_merge_recursive () to merge one or more arrays recursively
functionThe function merges the cells of one or more arrays, and the values in an array are appended to the previous array.Returns an array as the result. If the input array has the
ARRAY_INTERSECT_ASSOC () The intersection of the computed array with an index check
"Function" The function returns an array,The array contains all of the values in array1 but not in any other parameter array.Note that unlike the Array_intersect ()
What is an adorner?
Adorner mode, which adjusts some of the contents or functions of an existing object, but does not need to modify the original object structure, you can use the adorner to set the
Application Scenarios
Design a UserInfo class with
Interpreter mode
The interpreter pattern is used to analyze the key elements of an entity and to provide its own interpretation or corresponding action for each element. The interpreter mode is very common, such as the PHP template engine is a very
Normal process
1. Of course the official download the latest version (I use the win, so the next zip ~)
2. Copy the extracted files to the Web App's folder
3. Find config file \libraries = config.default.php copy One, change identity
I have recently played SAE online marketing training (Sina's cloud computing platform), so I played back to PHP. intends to write a microblog application, so in the process of writing to find simple controller mechanism is very easy to make the code
Many times users need to download files from the site, if the file can be obtained through a fixed link publicly, then we just need to store the file in the directory under Webroot. But in most cases, we need to do permission control, such as
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