Copy Code code as follows:
Date_default_timezone_set (' Asia/hong_kong '); Set time zone
Set_error_handler ("MyHandler"); Set Error Handler
$chinatime = Date (' y-m-d h:i:s '); Get current time
$max _size = 500000;
Try
{
$content =
Reference types (Reference) are used in many computer languages and are present as a very powerful and useful feature. It has a similar pointer (pointer) implementation, but it has a different performance than the pointer. For example, a reference
There is an XML file that reads as follows:
Copy Code code as follows:
Simpsons
FOX
8:00 pm
30
law & Order
NBC
8:00 pm
60
Here we use the XmlReader extension to parse and process the file, XmlReader another
I believe a lot of friends do not know, you can call in the Smarty template PHP built-in functions, we look at its use.
Template writing:{' param1 ' |functionname: ' param2 ': ' Param3 '}PHP function prototype:echo functionname (' param1 ', ' param2
I. Using the DOM to generate and read XML files
Example one:
Copy Code code as follows:
Creates XML string and XML document using the DOM
$dom = new DOMDocument (' 1.0 ');
Add Root-
$books = $dom->appendchild
The example in this article describes the Phpfastcache usage of the PHP cache integration Library. Share to everyone for your reference. The specific analysis is as follows:
Phpfastcache is an open source PHP cache that provides a simple PHP file
One, this
1, to use this, you have to be a situation of the image, otherwise it will be an error, Fatal error:using $this when not in the object context.2,this can call methods and properties in this class, or you can call methods and properties
This article describes the PHP custom file Save Session method. Share to everyone for your reference. The implementation methods are as follows:
session.inc.php file: Defines the session file store, the session solution, is to provide a way to
PHP is often not suitable for resident shell processes, he does not have a dedicated GC routines, and there is no effective memory management path. So if you use PHP as a resident shell, you will often be abort and unhappy by memory
This example describes the way PHP uses cookies to implement a shopping cart. Share to everyone for your reference. The specific analysis is as follows:
The PHP shopping cart is used on ecommerce sites, a supermarket like a shopping cart, select
Cookies cannot save an array by default, so the following is the wrong notation.The error is as follows:Warning:setcookie () expects parameter 2 to is string, array given inHowever, PHP can parse an array with a cookie with the same name and a
One day, meet a problem, ask for one months of today. At first we used the Strtotime ("-1 month") function to evaluate, and found that there was a problem, the month length of the month is not the same as the calculation results are incorrect. For
When we configure the PHP environment will often write phpinfo (), this function to test whether the PHP environment is installed successfully, but often this function will also bring security risks to the system, so how to turn off this function?
This example describes the methods that PHP uses to determine the Function_exists function. Share to everyone for your reference. Specifically as follows:
The functions described in this paper are used to create a GIF format graphics, parameter im
This article illustrates the use of Simplexml_load_file functions in PHP. Share to everyone for your reference. The specific usage analysis is as follows:
After the simplexml_load_file () function in PHP loads an XML document into an object, we can
This article is an example of PHP using file_get_contents instead of using curl method, share for everyone to reference. The implementation methods are as follows:
File_get_contents instead of using curl is rare, but sometimes you run into the
This example describes a common SQL attack regular expression in PHP. Share to everyone for your reference. The specific analysis is as follows:
As we all know, all the library names are stored in the INFORMATION_SCHEMA library in the MySQL 5+,
This article summed up the PHP site after the Trojan repair method. Share to everyone for your reference. The specific methods are as follows:
In Linux we can use the command to search the Trojan file, to the code installation directory to execute
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