After using it for so long, the basic symbols of PHP were not fully recognized. I found the @ number and found it for a long time. post the basic symbol list. For more information, see ~ Annotation symbol:
// Single line
This problem occurs when the mysql database is not told in php that the data you want to insert is of the gbk type. the solution is actually very simple. After connecting to the database, add this sentence. In the future, you must remember to define
The QueryPath (QP) library achieves jQuery-like effects in PHP. It can also be used to conveniently process XMLHTML... features are too powerful !!! Official Homepage http://querypath.org/
Qp api manual http://api.querypath.org/docs/QueryPath (QP)
This code is an operation after LoadModulerewrite_modulemodulesmod_rewrite.so is successfully run on apache. The php code is used to redirect the website url to a more complex logical structure. Opening and setting the rewrite module of apache is
When $ _ POST and $ _ GET are used to obtain the information sent by the customer, the array is usually used to add a small mark. Recently, I have seen a clever method. The principle is:
$ Var_a = 'Var _ B ';
$ Var_a = 'test ';
Echo $ var_ B; is '
PHPCURL simulates GET and POST function code. For more information, see.
The code is as follows:
Function vcurl ($ url, $ post = '', $ cookie ='', $ cookiejar = '', $ referer = ''){$ TmpInfo = '';$ Cookiepath = getcwd (). './'. $ cookiejar;$
PHP uploads and deletes Image implementation code. For more information, see. Upload images:
The code is as follows:
If (! Empty ($ _ FILES ["img"] ["name"]) {// extract the file domain content name and determine$ Path = "uppic/"; // Upload
The echo () function outputs one or more strings. Here we will give you a simple arrangement and hope to help you.
The code is as follows:
Echo "asd"; // stringEcho "ads $ c"; // String + variableEcho 'ads $ C'; // string asd $ c is not a
Converts a string containing full-width numeric characters, letters, spaces, or % +-() to a half-width character.
The code is as follows:
/*** Convert a string containing full-width numeric characters, letters, spaces, or '% +-()' to the
Array_flip () returns an inverted array. for example, the key name in trans is changed to a value, and the value in trans is changed to a key name. Description
Array array_flip (array trans)
Array_flip () returns an inverted array. for example,
PHP parses JSON data code. like most popular Web services such as twitter and Renren Netcom that provide data through open APIs, PHP always knows how to parse the various transfer formats of API data, including JSON and XML. Using this code, you can
In many php tutorials, beginners will encounter the undefinedfunctionmysql_connect () error prompt when phpmysql is the first time. Next, let's analyze the cause. I,
Remove the ";" before the following parameters in PHP. ini:
The code is as
Suitable for websites with domain names but directories that have not changed. you can also use 301 targeting. collected. afraid of future needs. copy the required brother directly. suitable for websites with domain names but directories that have
In PHP, the stristr () function is used to find another string in one string. If the search is successful, the rest of the string (from the matching point) is returned. if the string is not found, false is returned.
Supported versions: PHP 3 +
Summary of php string usage. For more information about php strings, see.
1. Evaluate the length, the most basic
$ Text = "sunny day ";
$ Count = strlen ($ text); // $ count = 9
2 string truncationNumber of characters before truncation
$ Article
Most programmers have been plagued by the problem of how to implement the code for converting Chinese characters to location codes in PHP. the following source code example can be of great help to everyone.
The code is as follows:
Global $
PHPprint class function summary, allowing you to thoroughly understand the specific usage and scope of use of the print function.
The code is as follows:
/************ By garcon1986 *********/// Difference between print and echo:// 1. echo can
The following code is the function code for obtaining the Image news list. it contains the core code for operating the xml file. For more information, see.
The code is as follows:
/* Obtain the image News list */Function getPicNews ($ number = 5 ){
This is the database operation class of phpmysql. it is taken from discuz. after modification, it can be used in other programs, and there are enough annotations for your reference.
The code is as follows:
Generate random names, thumbnails, and watermarks. Upimages. class. php Upload class
The code is as follows:
Class UpImages {Var $ attachment folder = "upload"; // The Attachment storage point. The default value is annex.Var $ smallFolder =
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