This article illustrates the principle of opcode in PHP. Share to everyone for your reference, specific as follows:
OpCode is a PHP script-compiled intermediate language, like the Java bytecode, or. Net of the MSL. This article is mainly based on
This article illustrates the problem of confusing length calculations in PHP. Share to everyone for your reference, specific as follows:
Often by the PHP array and string character functions dizzy, summarized below:
strlen ($string) function :
This article illustrates the use of PHP array function array_walk. Share to everyone for your reference, specific as follows:
$words =array ("L" => "Lemon", "O" => "Orange", "B" => "banana", "a" => "Apple");
Defines a callback function that
The examples in this article describe the MSSQL operations classes in PHP encapsulation. Share to everyone for your reference, specific as follows:
database server address,dbun-> login username,dbpw-> login Password,dbname-> database
Because the session is stored as a text file on the server side, the client is not afraid to modify session content. In fact, the server-side session file, PHP automatically modify the session file permissions, only the system to read and write
So I think in the master-slave database design, all session-related tables should be treated in a special way. That is: All session data tables can be updated and queried, when a user visits the site, the user is bound to the specified database, all
First, use the header method to set the message header Cache-control
QUOTE:
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
Second, using the Session_cache_limiter method
QUOTE:
Note to write before the Session_Start
A single linked list is a chain-access data structure that holds data elements from a linear table in a group of storage units with any address.
Brief introduction of single linked list
The data in the list is expressed as a node, the composition
Users concerned about the micro-credit after the public number, you can reply to the user's location (Tencent map) to the public number, extraction location information latitude and longitude, into the latitude and longitude of Baidu. Then according
PHP micro-letter Query City weather, first of all, you need to find a weather API, here, I use Baidu's Apistore, application and use the API URL: http://apistore.baidu.com/apiworks/servicedetail/112.html
Login Baidu account, and the mobile phone to
Fsockopen function can be used, first of all, to open the php.ini in the Allow_url_open=on;
Fsockopen is the encapsulation of the socket client code, which encapsulates the socket_create,socket_connect.
Server-side code: server.php
Copy Code
If the user entered a query that was inserted directly into an SQL statement, the application would be vulnerable to SQL injection, such as the following example:
Copy Code code as follows:
$unsafe _variable = $_post[' user_input '];
PHP connection memcached Cache server has two clients, one is memcache is the bottom of the development library, Memcached is a relatively new development library, PHP Install any one of these two extensions can be used in the writing of PHP code
Use Str-replace instead of Ereg-replace
Programmers who are accustomed to programming with Perl are more willing to use ereg_replace to complete string substitution, because ereg_replace usage in PHP is similar to that of pattern matching in Perl.
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