Toss a friend of the VPS, the installation of a good lnmp and other Web running environment will choose some cache expansion installation to improve the speed of PHP, often introduced by the eaccelerator, memcached, XCache, alternative PHP Cache
The LAMP combination is good, but if you want to set up a Web virtual host server that supports PHP, ASP, ASP.net, JSP, Perl, or IIS 6 with Windows 2003, it's best. There are a lot of articles on the web that describe PHP on IIS 6, but those methods
Whether you want to take part of the data from a link, or take an XML file and import it into a database, it's a simple way to get the Web content, CURL is a powerful PHP library.
Curl function library in PHP (Client URL library function)
One, how to disable Fsockopen () The following are two common methods for disabling Fsockopen. 1, modify php.ini, add disable_functions = add fsockopen 2, modify php.ini, Allow_url_ fopen = on changed to allow_url_fopen = off
Ii. How
The concept was first approached from Drupal, and at first it was a bit of a habit-why not write a closed tag? This feeling is not perfect, for people with obsessive-compulsive disorder is very not adapt to it! Later, in the work encountered because
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string enclosed in double quotes, single quotes are not, note: only echo can do this, it is a "function" that can take
1, what is a namespace?A namespace is a special scope that contains identifiers that are located under that scope, and which is itself an identifier. You can match the namespace to the directory of the operating system. A namespace is the equivalent
Spl_autoload_register(PHP 5 >= 5.1.2)spl_autoload_register-Registration __autoload () function
DescriptionBOOL Spl_autoload_register ([callback $autoload _function])Registers a function into the SPL __autoload function stack. If the functions in
PHP's Array function In_array () is very convenient, but JS is not. In fact, I do not like the JS array ~
Stop it, go directly to the method
Copy Code code as follows:
Array.prototype.in_array = function (e)
{
for (i=0;i{
if
Open the method of error Reporting in PHP for your reference.
There are many configuration settings in the php.ini file. You should have set up your own php.ini file and put it in the appropriate directory, as shown in the documentation
return value
The user space function uses the return keyword to return information to its calling space, which is the same as the C language syntax.
For example:
function Sample_long () {return
;
}
$bar = Sample_long ();
When
PHP to obtain the client IP address several ways to read PHP to obtain the client IP address of several methods, 1: Look at the Code: Echo "(1) The IP address of the user browsing the current page is:";
echo $_server[' REMOTE_ADDR ']
PHP has a lot of file directory functions, you can copy files, delete files. But sometimes because the copy file is too large, it can cause a program error.
For example, this file 1.flv is a video file, his memory will occupy a lot of, there
The Zii component contains some jquery-based UI components that are defined in the package Zii.widgets.jui, including Cjuiaccordion, Cjuiautocomplete,cjuidatepicker, and so on. This article describes cjuiaccordion, which displays a accordion
PHP Language performance optimization optimization what?As shown, PHP directly executes the opcode, so we minimize scanning and transcoding parsing. This is our first optimization point, try to use PHP built -in functions instead of our code to
PHP sets the HTTPONLY attribute method of the Cookie, cookiehttponly
Httponly is an extension made by Microsoft for cookies. It mainly solves the possible theft and use of cookies.
As we all know, when we log on to the mailbox or forum, the server
PHP to obtain form data and HTML embedded PHP script implementation, form php
When php accepts information submitted through an HTML form, it saves the submitted data in a Global Array. We can call the system-specific automatic global variable array
Let's take a closer look at common PHP object-oriented keywords and magic methods.
Common keywords in PHP object-oriented
Final
1. final cannot modify member attributes (constants in the class do not use this keyword)
2. final can only modify
PHP regular match backslash '\' and dollar '$', php slash
This example describes the PHP Regular Expression matching method with the backslash '\' and dollar '$. We will share this with you for your reference. The details are as follows:
1. test.
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