1. character location search function:
Strpos ($ STR, search, [int]): searches for the first position of search in $ STR starting from int;
Stripos ($ STR, search, [int]): the position where the string first appears in another string. This function
Similar_text-calculate the similarity between two strings
Int similar_text (string $ first, string $ second [, float & $ percent])
$ First is required. Specifies the first string to be compared.
$ Second is required. Specifies the second string to
Wzskynet # 163.com
· Php escapeshellcmd multi-byte encoding vulnerability
· Explain in detail the application of the cache technology in PHP
· Use PHP V5 to develop multi-task applications
· Detailed parsing of PHP data sending process to MySQL
·
However, a problem occurred when reading an image yesterday. Later, it was found that the URL contains Chinese characters.
For example:Copy codeThe Code is as follows: $ files = fopen ('HTTP: // www.website.com/my pp.jpg', 'rb ');
The returned
The GBK simplified character set is encoded in 1 and 2 bytes at the same time. When the high position is 0x00 ~ 0x7f is a byte, and the value above 0x80 is expressed in two bytes"
Note: The brackets are in hexadecimal format.
When you find that
The author, Jani Hartikainen, published a blog post comparing the two, listing the five reasons why PHP is better than Node. js. Let's take a look.
1. Easy to host
Most Web hosting server providers can host PHP, but for Node, you need to find a
Introduction
PHP is a very surprising language. It is powerful enough (the core language of the largest blog (wordpress) and extensive enough (running on facebook, the largest social networking website). It is simple enough (as the preferred
However, in this way, we can't do some statistics, permission checks, and so on. So, in many cases, we use PHP for forwarding to provide users with file downloads.
Copy codeThe Code is as follows: $ File = "/tmp/dummy.tar.gz ";
Header ("Content-type:
1. Related to mysql
Mysql_connectEstablish a connection with the MySQL serverSyntax
Resource mysql_connect (string server [, string usingname [, string password [, bool new_link [, int client_flags])Eg:
Copy codeThe Code is as follows: $ DB_HOST =
Mind Map
IntroductionUndertake the above PHP miscellaneous on restructuring-improving the design of existing code re-organize your function to continue refactoring. This chapter mainly focuses on Data Reconstruction. 1. argument: directly accessing
To solve this problem, first check whether your program has allocated too much memory. If there is no problem with the program, you can use the following method to increase the memory limit (memory_limit) of PHP ).
Check the php memory limit
Adminconfig. php this is the permission configuration for all files in the background system.
Fun. php this is a functional Function
Left. php website background loads the corresponding function menu based on the user login ID
Op. php calls
PHP scheduled execution in three ways
1. windows scheduled tasks
2. linux script program
3. Regularly refresh web browsers
Implementation
Windows scheduled task
PHP rarely run on the Windows server, the specific implementation is not further study,
See the following example:
Copy codeThe Code is as follows: $ Array = array (1, 2, 3 );
Function add (& $ arr ){
$ Arr [] = 4;
}
Add (@ $ array );
Print_r ($ array );
/**
At this time, $ array does not change and the output is:
Array
(
[0] => 1
[1] =
We can also use random numbers to design any program structure we imagine.
First, let's take a look at the random number function rand () provided by PHP (). The rand () function of PHP returns a random integer. The usage is as follows:
Rand (min,
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