Description
Array Array_flip (array trans)
Array_flip () returns a reversed array, such as the key name in trans becomes a value, and the value in trans is the key name.
Note that the value in trans needs to be able to be a valid key name, such as
Operating system: Windows 7 Ultimate
Web server: IIS 6.1 (Build 7600).
Database: MySql5.0.67
PHP Version: 5.2.13
I was also worried that Win7 might not be compatible, and it turned out to be a bit of a problem.
First, install MySQL database
MySQL
* Ini_get (): Gets the option value of the configuration file
This function believes that many people have, that is, to get the value of an option in the configuration file, if the value of True returns 1, if the value of False returns 0, the
EOF is a very important concept, and almost every major programming language provides built-in functions to verify that the parser has reached the file EOF. In PHP, this function is feof (). The feof () function is used to determine whether the end
Compare two strings in a case-sensitive manner
The Strcmp () function compares a binary security to two strings and is case-sensitive. The form is:
int strcmp (string str1, String str2)
Depending on the result of the comparison, one of the
The key of an array of PHP can be either a string type or an integer type. If key is a float type, it is automatically converted to an integer type.
If the maximum value of an index for a key,integer type is not specified for a value, the new key
Copy CodeThe code is as follows:
Nationwide, judging whether the $request_uri contains HTML
if (!strpos ($_server["Request_uri"], ". html"))
{
$page = "http://qq.ip138.com/weather/";
$html = file_get_contents ($page, ' R ');
$pattern = "/
National
Take a look at the following example:
Copy CodeThe code is as follows:
function Test ()
{
$w 3sky = 0;
echo $w 3sky;
$w 3sky++;
}
?>
Each call to this function sets the value of $w 3sky to 0 and outputs "0". Adding a variable to the $w 3sky++
Addcslashes-adds a backslash escape character for some characters inside a string
addslashes-characters inside a string are escaped in the specified manner
bin2hex-converts binary data to hexadecimal notation
alias function for Chop-rtrim
PHP Read radio button Radio value
Copy CodeThe code is as follows:
PHP read radio button Radio value
if ($_post)
{
Echo ' You have chosen single choice ', $_post[' RadioGroup1 '];
Because the properties of a radio button can
In this article we are going to provide you with two ways to iterate over object properties and illustrate the application of traversal object properties in PHP. You can see that private variables and static variables are not available, and can only
It enables PHP to communicate seamlessly with the following technologies:
(1) Flash and Flex Remoting
(2) JavaScript JSON and Ajax JSON
(3) XML and XML-RPC
What is RPCRemote Program invocation (RPC, remote Procedure call) is a way for clients to
1. In the case of file_get_contents instead of file, fopen, feof, Fgets and other series of methods, try to use file_get_contents, because he is much more efficient! But pay attention to file_get_ Contents PHP version problem when opening a URL file;
File structure
|――images
|――include
|――parameter
|――config
|――function
|――index
Images storage image files, include is the system is to refer to the file, generally in the parameter stored in the parameter file, config in the configuration file,
Implementation principle:
is to sort the ID pair by the ORDER by id DESC or the ORDER by ID ASC, and then determine the article that is less than the current id> or the same column as the current article ID.
The SQL statements for the instance are
Upimages.class.php PHP Upload Class
Copy CodeThe code is as follows:
Class Upimages {
var $annexFolder = "Upload";//Attachment storage point, default: Annex
var $smallFolder = "small";//thumbnail storage path, note: Must be placed under the
1. Simple anti-theft chain
Copy CodeThe code is as follows:
$ADMIN [Defaulturl] = "http://jb51.net/404.htm";//Address returned by hotlinking
$okaysites = Array ("http://jb51.net/", "http://www.jb51.net"); White List
$ADMIN [Url_1] =
Mysql_real_escape_string ()
So the SQL statement has a similar wording: "SELECT * from CDR where src =". $userId; Change to $userId =mysql_real_escape_string ($userId)
All printed statements, such as Echo,print, should be filtered using
Note: '//+ ' indicates additional notes for me
Class Typelink
{
var $typeDir;
var $dsql;
var $TypeID; + Category ID
var $baseDir; + Site root URL
var $modDir; + Template Catalog
var $indexUrl; + Home Link Address
var $indexName; + Home Link Name
var
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