Almost all CGI
Program There are such bugs, but the specific performance is not the same.
I. involved dangerous functions (include (), require () and include_once (), require_once ()〕
Include () & require () Statement: includes and runs the
PHP includes several functions to determine the type of a variable, such as GetType (), is_array (), is_float (), is_int (), is_object (), and is_string ().
CopyCodeThe Code is as follows: $ S = "this is a string ";
$ I = 9;
$ Arr = array (2, 4, 6
That is to say, if a string value is assigned to the variable VAR, VAR becomes a string. If another integer value is assigned to VaR, it becomes an integer.
The forced type conversion in PHP is very similar to that in C: add the target type
This is changed by pulling the menu at ASP Level 2.
CopyCode The Code is as follows:
}/* styles for menu items */ ul Li a { display: block; text-Decoration: none; color: #777; Background: #8a0000;/* IE6 bug */ padding: 5px; border: 0px #
CopyCodeThe Code is as follows: // database/table sharding
Algorithm
Function calc_hash_db ($ U, $ S = 4)
{
$ H = sprintf ("% u", CRC32 ($ u ));
$ H1 = intval (fmod ($ H, $ s ));
Return $ H1;
}
For ($ I = 1; I I {Echo calc_hash_db ($ I
CopyCodeThe Code is as follows: $ A = '123 ';
$ B = '000000 ';
Var_dump ($ A = $ B );
The output of this Code is bool (true), indicating that the two are equal. similar features are applicable when the 3rd in_array () function parameters are
A good Paging
Algorithm, Should have the following advantages:
The current page number should be in the middle.If the "Homepage" and "last page" are unavailable (currently on the first or last page), do not hide these two groups of text to avoid
The whole system only uses PHP with code, no JS, no regular... pure PHP... in fact, I will not do anything else...
Below is the HTML code of the original form...
Upload File Form
CopyCode The Code is as follows:
Map Name:
File Path:
In
1. Define an array
You can use the Array () language structure to create an array. It accepts a certain number of key => value parameter pairs separated by commas.
Array ([Key =>] value,...) // key can be a number or string // value can be any value
CopyCode The Code is as follows: /**
Author: Xiaoxiang blog
Time:2009-11-26
PHP Technology Group:37304662
Usage:Include_once 'pager. Class. php ';$ Pager = new pager ();If (isset ($ _ Get ['page'])$ Pager-> setcurrentpage ($ _ Get ['page'])
When it comes to form, it involves a request sending method (get and post). The usage and difference of get and post are not described in detail in this article, generally, it is commonly used in Web development because the post value is implicit
The first is the implementation of the plug-in management class:
CopyCode The Code is as follows: /**
* Stblog pluginmanager class
*
* Core plug-in implementation class
*
* @ Package stblog
* @ Subpackage Libraries
* @ Category Libraries
* @ Author
1. Read and Write locks are distinguished.If a write lock is used each time, multiple processes will be queued to read one file. This is definitely not efficient.2. distinguish between blocking and non-blocking modes.In general, if a process is
In addition, it is 3 times less efficient. Therefore, you must be careful with recursion in PHP.
I recently wrote a fast Sorting Algorithm and found that the recursive efficiency in PHP cannot be one-size-fits-all. It may be different on different
Method 1: use cookies for interaction.
There are three files in total: index.htm,action.php and main.htm
The original reason is that the main.htm and the background action. php are organized through the page framework index.htm and the page width of
Effect:
Put the following functions in the functions. php file of your topic:
Copy codeThe Code is as follows: function theme_echo_pagenavi (){
Global $ request, $ posts_per_page, $ wpdb, $ paged;
$ MaxButtonCount = 9; // The maximum number of
Foreach performs operations on Array replicas (by copying arrays), while operations are performed by moving internal indicators of the array. Generally, it is logically considered that, while should be faster than foreach (because foreach first
You must add a sub-menu to IE8 to hide it.
Copy codeThe Code is as follows:
Mysql_select_db ($ database_lr, $ lr );
$ Query = mysql_query ("SELECT * FROM bigclass order by sort ");
While ($ row = mysql_fetch_array ($ query ))
{
$ Bigclassid = $
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