int strcmp (String $str 1, String $str 2)
Compare in binary modeCase-sensitive when compared to this functionThe return value if STR1 is less than str2 returns 0 if the two equals return 0.
There is also a function strcasecmp (), the usage
PHP implements an efficient way to get remote picture size and size
Implementation code:
/** * Gets the width and volume of the remote picture * * @param string $url A link to a remote picture * @param string $type the way to get a remote picture
The field is simple/can be customized if necessary.
A total of two cities linkage, I business needs, so on the two floors, online about three layers of quite a lot, there is a need to learn from/
Don't say much, look first, the code is below
This article mainly introduces the PHP custom function to implement the array comparison function, involving PHP for array traversal, comparison, judgment and other related operations skills, the need for friends can refer to the following
This
0)) {$file _data=fread ($fp, $buffer); Statistics read how many bytes $file _count+= $buffer; Send some data back to the browser; echo $file _data; }//Close file fclose ($FP); }
There will always be some more special needs, and this function is found.
The following is excerpted from the Official Handbook Array_map ()
Callback--callback function, applied to each element in each array.
Array1--Array, traversing
tihinkphp with the page class style, sometimes can not meet the requirements of the project, here is the main introduction, page-style customization and beautification, make it more concise, beautiful THINKPHP5 controller wording
Function index
Ajax development
Ajax is "asynchronous Javascript and XML" (Asynchronous JavaScript and XML) refers to a web development technique that creates an interactive Web application.
AJAX = Asynchronous JavaScript and XML (a subset of standard generic
Gzencode uses Zlib_encoding_gzip encoding by default, using the gzip compression format, in effect compressing the data using the Defalte algorithm, and then adding the header and Adler32 checksum
Gzdeflate uses the Zlib_encoding_raw encoding
Today in the project with the PHP foreach database query results, in order to facilitate not to determine whether the data exist, directly with (array) to force the conversion of data, just start Web page always open, reported 502, a Meng, suddenly
Knowledge structure of qualified PHP engineers
All of a sudden thought so much, follow-up thought of re-fill, please give us a lot of advice. Actually programming uses what language is not important, the most important is the thought, the
Friendship Tip: in the server use Phpwamp, the environment after the setting up, please close the Phpwamp software, Phpwamp divided into software interface operation and service operation, need to operate the environment to open Phpwamp software
Given a string, such as "ABCDEFG," it is reversed in a recursive fashion.
Write a sort algorithm that can be a bubble sort or a quick sort, assuming that the sorted object is a one-dimensional data.
How to understand Unicode encoding and utf-8
Building the encapsulation of a database access class
host, $this->uid, $this->pwd, $db); Determine if the connection is successful !mysqli_connect_error () or Die ("Connection failed! "); Execute SQL
0x00:
First, declare a global variable.
var control = true;
Then, make a judgment on the code that slips the penalty for the AJAX request.
if (Control) { $ ('. Get_more '). Click ();};
This place is the function that gets the data and the
PHP provides several interceptors that are called when accessing undefined methods and properties, and __get ($property) is called when an undefined class property is accessed, $property the name of the property being accessed. When an undefined
protected function Isphone () { $agent = strtolower ($_server[' http_user_agent ']); PC Request header information Array $pc _arr=array (' Windows NT ', ' Macintosh ', ' ipad ', ' baiduspider ', ' spider '); If you
The use of the technology to effectively support a large number of fine-grained objects, the need for friends can refer to.
Enjoy meta-mode English is called "Flyweight pattern", I am very grateful to the Flyweight pattern translated into the model
When we want to add a multilevel directory to our site, we can use PHP function mkdir () to implement this function. Support to create Chinese catalog
The mkdir () function creates a directory. Returns true if successful, otherwise false is
The two methods of merging arrays in PHP and the differences are introduced, the need for friends can refer to the following
Two methods and differences of PHP array mergingIf it is an associative array, the following:
Copy the Code code as follows:
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