It may sound a bit hazy, and we'll illustrate it in a few examples:
Copy the Code code as follows:
Echo ' Example: ';Fastcgi_finish_request ();Echo ' to was, or not to be, which is the question. ';File_put_contents (' log.txt ', ' survival or
Copy the Code code as follows:
/*—————————————————— */– Get list data for an unlimited assortment/*—————————————————— */function Get_sort ($parent _id=0, $n =-1){Global $db;static $sort _list = Array ();$sql = "SELECT * from". $db->table ('
Mysql_num_rows and COUNT (*) can count the total, that can be better?
Or
When do you use Num_rows and COUNT (*) separately?
An intuitive contrast
Test data:
Number of articles: 139,764
Data table Size: 500M
Results:
Fetch_num_rows spents: 35.27232909
Copy the Code code as follows:
– Delete multiple static pages generated from an article– the generated article is named 5.html 5_2.html 5_3.html/*—————————————————— */function delstatichtml ($article _id){Global $db;$sql = "Select ' Post_time '
The prototype of the Find function
Copy the Code code as follows:
/*** Returns the first record that meets the criteria and all associated data, and the query returns false with no results** @param mixed $conditions* @param string $sort* @param
Fatal Error:non-static Method Conn::__construct () cannot be called statically in/file.php
There is no static method (inside this refers to a method parameter, a string type) and cannot be referenced from a static context.
Fatal error: [] operator
From the browser, using the header (location) to jump to another page, but in fact, PHP will still execute the background code, if the following code has unsafe logic, then directly ignore the developer set the conditions, continue to put the
Take a look at the following code:
Copy the Code code as follows:
Class A {Public function X () {echo "A::x () was called.\n";}Public function Y () {Self::x ();echo "A::y () was called.\n";}Public Function Z () {$this->x ();echo "A::z () was
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
Compiling and installing PHP 5.3.3
Since php5.3.x has brought php-fpm, there is no need to patch
# sudo./configure--prefix=/usr/local/php-5.3.3--with-mcrypt--with-gettext--with-mysql--with-gd--with-jpeg-dir--
Online Demo Address: http://tools.jb51.net/tools/cs.php
Copy the Code code as follows:
function Zhuanhuan () {$urlodd =explode ('///', $_get["url"],2),//The link is divided into 2 segments,//front is the first paragraph, followed by the second
The situation is as follows:
1, click on the Guarantee button, can not go to the page normally, there is a blank page;
2, refresh the page, issued many items in the navigation is no longer, there is still a click on the item can not enter the normal
Copy the Code code as follows:
$ip = "Www.jb51.net"; $ip can be arbitrarily changed to another domain name or an IP address$source =file_get_contents (' http://www.ip138.com/ips.asp?ip= ' $ip. ' &action=2 ');Regular matchPreg_match_all ("/
(. *
Copy CodeThe code is as follows:
function Getcloud ($data = Array (), $minFontSize = A, $maxFontSize = 30){$minimumCount = Min (array_values ($data));$maximumCount = Max (Array_values ($data));$spread = $maximumCount-$minimumCount;$cloudHTML =
Cause:
Today, the project encountered a problem: need to dynamically update the picture on the home page, to show that the site is not finished even if, is someone has been maintaining. Well, the demand has, how to achieve?!
My idea is 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