Recently on the PHP official website to see a new version of PHP download, and then went up to find for Windows, but a look, altogether gave four versions, VC9 x86 Non thread safe, VC9 x86 thread safe, VC6 x86 Non thread Safe, VC6 x86 Thread safe,
To achieve GZIP compression page requires browser and server co-support, in fact, the server compression, uploaded to the browser after the browser decompression and parsing. There is no need for us to worry about the browser because most browsers
Example: Array_unique (Array (1, 1, 2));
And his result is
Array (2) {
[0]=>
Int (1)
[2]=>
Int (2)
}
This is not a numeric array, just do json_encode, will output a JSON object, not an array
{"0": 1, "2": 2}
If this time on the page JS need is
That's what it started with.
$str = Iconv (' UTF-8 ', ' GB2312 ', unescape (isset ($_get[' str '))? $_get[' str ']: ");
Go online and report a bunch of such errors: Iconv (): detected an illegal character in input string
Consider the GB2312
WORKAROUND: Use the server as the proxy.
In PHP, use my favorite of the most powerful curl, hehe
Here is the example code for querying the domain name in the million grid
Copy CodeThe code is as follows:
$DN = $_get[' dn ']; Domain name, not
The following describes the features of the Smarty template engine:
1. Speed: The program written in Smarty can get the maximum speed improvement, which is relative to other template engine technology.
2. Compiled: The program written in Smarty is
I. Numeric data types
Numeric or numeric data is typically two types of double and int in PHP.
PHP is a loosely typed scripting language, paying attention to the way the type is converted.
Copy CodeThe code is as follows:
$a = ' 5 ';
A string of
Here's the online
Copy CodeThe code is as follows:
Class Arraytoxml
{
/**
* The main function for converting to an XML document.
* Pass in a multi dimensional array and this recrusively loops through and builds up an XML document.
*
* @param array $
Copy CodeThe code is as follows:
Gets the directory name of the specified folder
function Get_dir_name ($dir _path, $file)
{
$dirpath = $dir _path;
$dir = Scandir ($dirpath);
foreach ($dir as $key = $value)
{
if (Is_dir ($dirpath. ' /'. $value) &&
Copy CodeThe code is as follows:
/* Interface Technology
*
* Interface is a special kind of abstract class, abstract class is also a special class
*
* Interfaces and abstract classes are the same function
*
* Because PHP is single-inheritance, if
1. Definition and display of stringsDefinition: By "", "" to mark
Display: Echo () and print (), but print () has a return value of 1, and Echo () does not, but Echo is faster than print (), and print () can be used in compound statements.
2.
Some time ago to ZF, the black box when he felt not very good, has been to see its source of impulse, but ... If you look at it at 1.1, the challenge is really a little bit bigger. One day and then thought for a long time did not review design
One, no matter what the program, function name () {}, for () {}, .... Too much, do not say also know what to do with.
Second, the $str {4} After the variable of the string followed by {} curly braces and brackets are the same as the string variable
Session.save_handler = Files
1. Session_Start ()Session_Start () is the beginning of the session mechanism, it has a certain probability to turn on garbage collection, because the session is stored in the file, PHP itself garbage collection is not
This is also one of the basic ideas of OO design. Before PHP5, if you need to use a class, just use Include/require to include it directly. The following is a practical example:
Copy CodeThe code is as follows:
Class classa{
Public Function
When you use $_post['],$_get[' to get the parameters in the form
Notice
: Undefined index:--------;
We often receive forms POST the data Times undefined index error, as follows: $act =$_post[' action ';Always prompt with the above
So, the first chapter, reusable class code to paste out, easy to consult later and to provide the necessary friends.
: User class, including read and set database, and save change interaction
Copy CodeThe code is as follows:
Class user{
Private
Definition and usage
The PHP extract () function imports variables from the array into the current symbol table.
For each element in the array, the key name is used for the variable name, and the key value is used for the variable value.
The
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