Array_search () Definition and usage
The Array_search () function, like In_array (), looks for a key value in the array. If the value is found, the key name of the matching element is returned. Returns False if it is not found.
Before PHP 4.2.0, the
Use of text boxes:
The input type includes text, password and other types, HTML5 added a lot of input types, if you want to learn this kind of knowledge can be a good understanding, because the finer points, the more convenient to use.
See
PHP built-in function array_multisort requires the same size as each array
$areas is a two-dimensional array of regions, containing the number of people and the number of times, which are now sorted in descending order of these 2 numbers
Copy the
Krsort () Definition and usage
The Krsort () function reverses the array by key, preserving the original key for the set value.
The Second optional parameter contains an additional sort flag.
Returns TRUE if successful, otherwise FALSE is
Search on the Internet a lot of methods do not work, the study of the day, found through the following configuration can perfectly support the ' Url_model ' + 2 situation
Copy the Code code as follows:
location/project/{Index index.php;if (!-e
Package download
pain.php
Copy the Code code as follows:
Class Pain{Public $var =array ();Public $tpl =array ();The the method to assign VARs to the templatePublic function assign ($variable, $value =null){$this->var[$variable]= $value;}Public
The principle is as follows, if:
Encryption
PlainText: 1010 1001
Key: 1110 0011
Ciphertext: 0100 1010
The ciphertext 0100 1010, the decryption of the need and key can be different or down
Decrypt
Ciphertext: 0100 1010
Key: 1110 0011
PlainText: 1010 1
One, PHP script code tag
PHP script is a special tag in the file included in the content, such as ASP is "", PHP can be seen as "
”。
However, in order to adapt the XML standard to embed PHP into XML or XHTML, PHP does not recommend using the short
The first clear I refer to the PHP project, refers to the post-graduation work, mainly in PHP web system development, did not use its language work. Work experience in about 3-4 years, ordinary Web system (millions access, level 1000 data or
Status state mode is one of the GOF23 modes, as well as the command pattern, which is also a behavior pattern. The state mode and the command pattern are quite similar, and the application of the "interface-Implementation Class" mode is the
For example: ' Xu ' has been json_encode processed and changed to ' \u80e5 ', and the Chinese part of the final JSON is replaced with Unicode encoding. All we have to do is convert the object to JSON and make sure that the Chinese inside the object
Suppose you now have a picture file whose server-side path is:
$path = "/www/mywebsite/images/myphoto.jpg";
1.pathinfo () function
The PathInfo () function returns an array containing the file information, with four elements, dirname, basename,
1. $_request
PHP $_request can get data submitted in post and get methods, but it is slow
2. $_get
Used to obtain data submitted by the browser through the Get method. Get method He does this by adding the parameter data to the URL that is referred
The first type of notation:
$c
Echo $content;
The second way:
Str_replace ("\ r \ n", "", $str);
The third type of notation:
$c/\s/"," ", $content);
Echo $content;
Report:
First of all, \n,\r,\t.
\ n Soft return:
Show line breaks in Windows and go
Copy CodeThe code is as follows:
/** Encapsulation: One of the three main characteristics of object-oriented** 1. Is to combine the object's members (attributes, methods) into a separate unit, and hide the inner details of the object as much 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