?
Tree-type directory structure template program
Menu Directory Gallery Field Description:
MENU_ID menu item ID
Menu Name
Menu_grade Menu Level 1 Main Menu 2 is level two menu ...
Menu_superior Top level Menu ID number
function My_menu ($menu
The example of this article for everyone to share the English word statistics PHP implementation, for your reference, the specific content as follows
The program starts to run, press "Browse" button to choose an English document, and then press
This example for you to share the PHP watermark and thumbnail Production code, the use of object-oriented methods to achieve common picture format jpg,png,gif watermark and thumbnail production, for your reference, the specific contents are as
The concept of an array
Array is a very important concept in PHP, we can think of arrays as a set of similar data, in fact, the array is an ordered graph.
PHP also provides more than 70 built-in functions to manipulate the array.
Create an array
Three built-in functions:
Time () //Get UNIX System timestamp
mktime (hour,minute,second,month,day,year) //Convert specified time to timestamp
date (time format, timestamp) //Convert time stamp to convenient reading time
Time-> Date:
After reading will be, will not you hit me, words do not say more, open do ( people hate words not much )
1 first read the code first
OK, now combine the above code to analyze and analyze several functions used above:
In the development of the project due to the introduction of the batch record array, due to many fields, so it is impossible to &a=322&=gsd&v=rwe in the ordinary way to transmit, so thought of the front-handed JSON format in the past content=[{' a ':
1.fread
string fread (int $handle, int $length)
Fread () reads up to length bytes from the file pointed to by handle. The function stops reading a file when it reads up to a maximum length of bytes, or when it reaches EOF, or (for a network stream)
This article illustrates a simple probability-related code for PHP implementation. Share to everyone for your reference, specific as follows:
';
Echo $b. ' ';
Echo $c. ' ';
? >
Output results:
195892979550615
Key in Mt_rand (0,10
This example describes how PHP uses the Number_format function to intercept decimals. Share to everyone for your reference, specific as follows:
You know you can use PHP's Number_format () function to group numbers by thousand. But it rounded up
1, first we have to figure out what is bubble sort, do not understand the principle of bubble sort, we can not write code.
The basic concept of bubble sort (bubblesort) is to compare the number of adjacent two digits, place the decimal number in
The example of this article describes the PHP quick Sort method. Share to everyone for your reference, specific as follows:
$pivot)
$hi--;
else{
$t = $n [$lo +1];
$n [$lo +1]= $n [$hi-1];
$n [$hi -1]= $t;
This example for you to share the data paging display function of the PHP implementation code for your reference, the specific content as follows
Implementation code:
user list
"; echo $row [' name '].
"; echo $row [' email '
This example summarizes the header usage in PHP. Share to everyone for your reference, specific as follows:
The header () function in PHP is the role of sending header information to the client.
What is header information?
Here is only a simple
1. PHP __file__ Constants (How to get the root directory)
The dirname (__file___) function returns the path where the script resides.
For example, file b.php contains the following:
$basedir = DirName (__file__);
?>
If b.php is referenced by a.php
Automatically generate an article summary [JavaScript version].
We often need to display the previous part of the article when we write a program like blogging, but we are afraid that improper truncation destroys the closed tag to cause the
'%23
' and password= ' Mypass
Id=-1 Union Select 1,1,1
Id=-1 Union Select char (), char (), char (97)
Id=1 Union select 1,1,1 from members
Id=1 Union select 1,1,1 from admin
Id=1 Union select 1,1,1 from user
Userid=1 and
If you want to use the conversion of the amount, the processing of the decimal part should be modified
function Ch_num ($num, $mode =true) {
$char = Array ("0", "one", "II", "three", "Restaurant", "WU", "Lu", "Qi", "ba", "Nine");
$DW = Array ("",
PHP Batch Gets the value of the checkbox
1, naming
2. Use
When the plan is treated as part of the SQL directive: if the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox ')) {
$expr = Join (",", $_post['
You can use PHP to generate Excel files. Teaman translation
----------------------------
Excel functions
----------------------------
Save the following code as excel.php and include it in the page
and then call
1. Call Xlsbof ()
2. Write some
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