In the past to build a station is generally custom development, which requires a high level of technical, and code is not easy to reuse, others are not easy to maintain, for the CMS, there is no need to customize the development, because the basic
Example:
!defined (' MAGIC_QUOTES_GPC ') && define (' MAGIC_QUOTES_GPC ', GET_MAGIC_QUOTES_GPC ());
O (︶^︶) o Alas, very faint, today asked n many people. Finally get the "&&" thing figured out what's going on.
Operators are not judged to write
So we can use this function to do a lot of purposes, such as: Single Sign-on token encryption transmission, temporary password, etc.
Copy CodeThe code is as follows:
/**
* @param string $string original text or ciphertext
* @param string $operation
1. Form section
Allow users to upload files and add an uploaded attribute to the declaration of the HTML form:
enctype = ' Multipart/form-data '
The form's method must be a post
Form Options max_file_size hidden fields are used to limit the size of
One: Structure and invocation (instantiation):Class classname{}, called: $obj = new ClassName (), and when the class has a constructor, it should also pass in the parameter. such as $obj = new ClassName ($v, $v 2 ...);two: Constructors and
This is a long time ago collected one, do not know who wrote, but after testing no problem ~
JavaScript code
Copy CodeThe code is as follows:
function Phpunescape ($ESCSTR)
{
Preg_match_all ("/%u[0-9a-za-z]{4}|%.{ 2}| [0-9a-za-z.+-_]+/], $ESCSTR,
php file
Copy CodeThe code is as follows:
Class xpathextension{
public static function Getnodes ($domDoc, $xpathString) {
$XP = new Domxpath ($DOMDOC);
$xp->registernamespace (' x ', ' http://www.w3.org/1999/xhtml ');
$xp->registernamespace ('
Do not change here, maintain the default selection can be
Click the browse button to change the installation directory to D drive
Change Web Server port to 85 to avoid conflicts with IIS
Installation completed because Zend Server has a profile
Blog: WordPress
WordPress is the use of PHP development of the famous blog platform, free open source, powerful, not only for the blog building, can also be widely used in various types of network information publishing platform.
Forum: PhpBB
phpBB
Copy CodeThe code is as follows:
$uname =$_post["username"];
$pwd =$_post["Password"];
$link = mysql_connect (' localhost ', ' root ', ' 123456 ')
Or Die (' Could not connect: '. Mysql_error ());
mysql_select_db (' Ruida ') or Die (' Could not
Copy the Code code as follows:
$f =fopen ("Test.txt", "WB");
$text =utf8_encode ("a!");
Use the function Utf8_encode to change the data you want to write to the UTF encoding format.
$text = "\\xEF\\xBB\\xBF". $text;
"\\xEF\\xBB\\xBF", this string
Copy CodeThe code is as follows:
———————————————————————————–
Function name: Checklengthbetween ($C _char, $I _len1, $I _len2=100)
Function: Determines whether the string is within the specified length
Parameters: $C _char (string to be detected)
$I
Copy CodeThe code is as follows:
The search function, where $array is an array, $k the value to find, $low the minimum key value for the lookup range, $high the maximum key value for the lookup range
function Search ($array, $k, $low =0, $high =0)
{
Using ajax+php to create a progress bar is actually very simple.
ReadyState = = Status (0,1,2,3,4)
0: The request was not initialized and the open was not called
1: The request has been established, but has not yet been sent, and the send has not
foreach can easily modify the cells of an array by adding & before the $value, such as:
PHP code
Copy CodeThe code is as follows:
foreach ($arr as $value) {
$value. = ' 4 ';
}
But this usage is also very easy to make mistakes, and it is not easy
ReadyState = = Status (0,1,2,3,4)
0: The request was not initialized and the open was not called
1: The request has been established, but has not yet been sent, and the send has not been called
2: The request has been sent and is being processed
3:
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