As shown below:
Copy CodeThe code is as follows:
$rndstring = ";
for ($i =0; $i If GD is supported, the drawing
if (function_exists ("Imagecreate"))
{
Firefox part of the situation will be asked multiple times, the refresh page within 5 seconds
The NL2BR () function converts a line break in a string to a newline symbol in HTML
Copy CodeThe code is as follows:
$str = "It's been raining in recent days, it's sad.
, the ball is not playing, and the shoes are soaked. ";
Echo $str;
echo
StraceIs
LinuxA program debugging tool in the environment that monitors the system calls used by an application and the system information it receives.
Strace is a useful gadget that allows you to know what a program does in the background by
As shown below:
Copy CodeThe code is as follows:
The Usleep () function delays code execution for several microseconds.
The unpack () function unpack the data from a binary string.
The Uniqid () function generates a unique ID based on the current
If your URL link is relative to the path "Static/mapi.css", you want to replace him in bulk with the absolute path "http://dev.baidu.com/wiki/static/map/cloud/static/mapi.css". Well, you can do this:
Write a php file and write the URL you want to
Summary of tips for optimizing PHP code1. If a method can be static, then declare that he is static, the speed can be increased by 1/4;
2. Echo is more efficient than print, because Echo has no return value, and print returns an integer type;
3. Set
Viewer mode:Defines a one-to-many dependency between objects, and when an object's state changes, all objects that depend on it are notified and updated automatically.
Viewer class:1. Abstract theme role: The subject role saves all references to
Parameter filtering
Filter cat_id=2$CL->setfilter ("cat_id", Array (2));Search only in sub-forums with IDs 1, 3, 7$CL->setfilter ("forum_id", Array (1,3,7));Range filteringFilter publish time is today, parameter is int timestamp$CL->setfilterrange (
The difference between ph and C # value copy (if it's wrong, look!) )
$a = 2;
$b = $a; In PHP, the address of B points to a so B is equal to 2 at this time; the difference is here.
$a = 5; The value of a in PHP is then re-written value, so the PHP
MySQL root account, I usually use the connection is localhost or 127.0.0.1, the company's test server mysql is also localhost so I want to access inaccessible, test paused.
Workaround:
1, modify the table, log in to the MySQL database, switch to
Factory mode: By the factory class according to the parameters of the decision to create an example of which production classFactory class: A method class that is designed to create other objects. That is, on demand, incoming parameters to select,
The basic idea of exchange sorting: 22 Compare the data to be sorted, if reverse order occurs, then swap until all the data is sorted.
• The basic idea of bubble sorting:1. From the forward, scan all the data, if the adjacent two numbers occur in
What the individual thinks is the cause of the impact:
The URL that matches to the image is not a valid URL, the text is only simple to determine whether it is a relative path, but some URLs are invalid
Workaround: A new image that determines
Many times we need to encrypt and decrypt data, such as some data that needs to be saved to a cookie, but not easily accessible by the user, and we need to encrypt the data to be stored in a cookie, and then decrypt it when we need to use it.
The
"Cause": Because PHP ' s integer type is signed, and many IP addresses would result in negative integers.
"Workaround": it is mentioned in its official manual that you can "need to use the"%u "Formatter of sprintf () or printf () to get the string
PHP is a weak type of language. This is the advantage and feature of it, but sometimes you have to convert the type accordingly.
That's when the problem comes. Because in many cases, you will find that the data obtained after the conversion type
Have done a lot of crawling other site content products, accustomed to the use of quick and easy file_get_contents function, but always encounter the problem of getting failed, although the example set by the manual time-out, can not be effective
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