Configuration:
1. Download vc9 x86 thread safe from the windows.php.net/download website
2. decompress the file to the directory.
3. Modify PHP. ini (delete PHP. ini_d...) and open the MySQL extension (Delete; Extension = php_mysql.dll)
The number_format () function uses a thousand-bit grouping to format numbers.
Syntax Number_format (number, decimals, decimalpoint, separator)
Parameters
Description
Number
Required. The number to be
CopyCodeThe Code is as follows: Echo 'in in time: '. $ begin = microtime (false).' '; // begin to count time
$ Array = array ();
For ($ I = 1; $ I $ Array [$ I] = $ I;
}
/*
$ Arr = $ array; // the total time for copying and printing data is 0.0
There are three common methods to traverse arrays in PHP:
1. Use the for statement to traverse the array cyclically;
2. Use the foreach statement to traverse the array;
3. Use List (), each (), and while loop to traverse the array.
Among the three
/**
* $ SplitChar field delimiter
* $ File data file name
* $ Table database table name
* $ Conn database connection
* $ Name of the column corresponding to fields data
* $ InsertType INSERT operation type, including INSERT and REPLACE
*/
Copy
Reg. php
Copy codeThe Code is as follows:
registration page
Error_reporting (0 );
// Prevent PHP reports from being reported. If it is not closed, the following error occurs: Warning: preg_match ().
Session_start ();
Header
Recently, when reading a cool man's code, I saw a very useful function: extract (). Its main function is to expand the array and use the key name as the variable name, the element value is a variable value, which provides another convenient tool for
1. code optimization
Code optimization not only writes clean and clear code, but also simplifies the code. Zend Optimizer can be used to automatically complete these complex tasks. Zend Optimizer can be obtained from Zend Technologies's website http:
First, we need jquery. js, jquery. autocomplete. js, and jquery. autocomplete. js. Where are these three files? Baidu and Google can all be found. You can go to the official website to go up and down, which contains some demos and leave only these
I am often asked if the PHP array is accessed using foreach, is the traversal order fixed? In what order does it traverse?
For example:
Copy codeThe Code is as follows: $ Arr ['laruence '] = 'huixinchen ';
$ Arr ['yahoo '] = 2007;
$ Arr ['baidu'] = 2
When searching for something, we often encounter the goal of inputting multiple conditions through spaces. Today, I encountered this problem in the project. I wrote a function and put multiple conditions in the array. Currently, space, comma
When $ _ post [''] and $ _ get [''] are used to obtain parameters in the formNotice: Undefined index :--------;
We often receive Undefined index errors when receiving data from form POST, as follows: $ act =$ _ POST ['action'];The above code always
I. Modify the File Upload language to PHP.Open fckconfig. js
Find:
Var _ FileBrowserLanguage = 'asp'
Var _ QuickUploadLanguage = 'asp'
Changed:
Var _ FileBrowserLanguage = 'php'
Var _ QuickUploadLanguage = 'php'
Ii. Enable PHP File Upload1: Enable
Use the array_multisort () function to sort multiple arrays or multi-dimensional arrays. If you are studying array sorting and multi-dimensional array sorting, you can see.
Function bool array_multisort (array & $ arr [, mixed $ arg = SORT_ASC [,
I. Error HandlingException Handling: unexpected, unexpected, occurs during the running of the program. Use an exception to change the normal process of the script.
A new important feature in PHP5
Copy codeThe Code is as follows: if (){
} Else
Php web page garbled characters are generally caused by different encoding used during database creation and php Web page encoding,
If you do not specify the encoding for a database created using phpmyadmin, the default encoding is
Now we start our PHP coding journey in the Linux world. There will be various problems in coding, and the time to solve the problem is also the time for us to change from new to New.
Every programming language starts from the variable. PHP is a type
I actually called a zend database access method and used the fetchAll method. However, because this record is not found in the database, the returned object is null, so I will judge whether the object is null:
Copy codeThe Code is as follows: if (
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