First
1. Make sure that you have the php_mbstring.dll file in Windows/system32. If not, just export it to Windows/system32 from the extensions directory of your PHP installation directory.
2. Find PHP. ini in the Windows directory to open the
I activated the PHP space yesterday and installed the PHP P4 version on the server. I started to use PHP to write things in the last 20 days. My own platforms are all PhP5. Of course I am very careful when writing them, because almost every segment
Author:
Haohappy
MSN: haohappy at msn.com
Blog: http://blog.csdn.net/haohappy2004
2006-07-04
Why?
Debugger? Many PHP
Program Debugging Using echo, print_r (), var_dump (), and printf () is enough for programmers with rich
Causes of Ajax garbled characters
Because XMLHTTP uses unicode encoding to upload data, and generally uses gb2312 as the page, garbled characters are generated when the page is displayed. When the page is obtained, XMLHTTP returns UTF-8 encoding,
// Convert the binary representation of a number into hexadecimal format
String bin2hex (string tring)// Remove spaces at the end of the string
String rtrim (string)// Rtrim alias
String chop (string)// Remove spaces from both ends of the
Snoopy is used in magpierss, which makes me a little interested in studying this. On SF, find this
Source code . It is actually a class, but don't smile. It is very powerful.
I translated the official introduction (Khan... Recently, I have
$ DBH = @ mysql_connect ("localhost: 3306", "root", "9999 ");
/* Define the variable DBH. The mysql_connect () function means to connect to the MySQL database, and "@" means to block the error */
If (! $ DBH) {die ("error ");}
/* The die () function
Note: The following functions do not use regular expressions.
The above are the three functions that match the first one to achieve the same purpose.
Function str_cut ($ STR, $ start, $ end) {// obtain the first match, with the highest
Code Reuse
Include ()
Require ()
These two functions are used to reference files. The difference is that when processing fails, include () generates a warning and require () is a dense error.
Include_once ()
Require_once ()
These two functions are
Regular Expression
There are two sets of regular expression function libraries in PHP. The two functions are similar, but the execution efficiency is slightly different:One set is provided by the PCRE (Perl Compatible Regular Expression) Library.
1. Purpose of this function: Remove repeated elements in the array and sort by key names
Function assoc_unique ($ arr, $ key ){
$ Tmp_arr = array ();
Foreach ($ arr as $ K =>$ v ){
If (in_array ($ V [$ key], $ tmp_arr )){
Unset ($ arr [$ K]);
}
"^ The": matches strings starting with ";
"Of despair $": match the string ending with "of despair;
"^ Abc $": matches strings starting with abc and ending with abc. In fact, only abc matches;
"Notice": matches a string containing notice;
You can
The general idea is as follows: in order not to refresh the previous page, I used iframe to dive into a second-level subpage to read data in the database and finally pass the desired data to the parent page, select and transfer data.
The main
Just like the address path in my log, let index. php? Action = one & do = two
Changed :? Index/action/one/do/two
Copy codeThe Code is as follows: index. php
--------------
// PARSING QUERY STRING$ QS = explode ("&", $ _ SERVER ['query _ string']);$
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