How to maintain interaction between the front-end page and the background CGI page without refreshing a new page during the web page creation process remains a problem. Here we will introduce two methods. Method 1: use cookies for interaction.
There
This keyword can only be used to define classes and methods. The final keyword cannot be used to define member attributes. because final is a constant, we use define () to define constants in PHP () function, so you cannot use final to define member
Understanding: literally, it is to get the site URL
The code is as follows: function getsiteurl ()
{
Global $ _ SCONFIG;
If (empty ($ _ SCONFIG ['siteallurl'])
{
$ Uri = $ _ SERVER ['request _ URI ']? $ _ SERVER ['request _ URI '] :( $ _ SERVER
I have to write a. XML file myself, but I have never used it. below is the content related to the XML operation class DOMDocument.
Attribute:
Attribute list of the Attributes storage node (read-only)
List of child nodes of the childNodes storage
Decompress the zip file using php.
The code is as follows:
Class zip
{
Var $ datasec, $ ctrl_dir = array ();
Var $ eof_ctrl_dir = "\ x50 \ x4b \ x05 \ x06 \ x00 \ x00 \ x00 \ x00 ";
Var $ old_offset = 0; var $ dirs = Array (".");
Function get_List (
Php efficiency summary helps improve the efficiency of program development and execution. 1. when passing an array in a function
Using return is more efficient than using global
For example
Function userloginfo ($ usertemp ){
$ Detail = explode ("|"
Definition and scope of action: used to test whether a variable has a value (including 0, FALSE, or an empty string, but cannot be NULL), that is, "localhost? Fo "can also pass detection, so it is not applicable. However, if the parameter "localhost"
If the declared class member or method is static, you can directly access it without instantiating the class. You cannot access static members through an object (except for static methods ). To ensure compatibility with PHP4, if "visibility" is not
This function converts the URL and e-mail address strings into clickable superlinks.
The code is as follows:
Function makeClickableLinks ($ text ){
$ Text = eregi_replace ('(f | ht) {1} tp: //) [-a-zA-Z0-9 @: % _ + .~ #? & // =] +) ',' \ 1', $
The reflection-based plug-in architecture is not actually classified as a pattern, because it is not actually a template, but the concept of a program architecture formed by a combination of a pair of columns. The Reflection API plug-in method is
Variables in the literal in the middle of a single quotation mark are not executed, and variables in the middle of a double quotation mark can be executed. Therefore, the efficiency of output characters in single quotation marks is much higher than
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"; // string
Echo "ads $ c"; // String + variable
Echo 'ads $ C'; // string asd $ c is not a
When the system we develop needs to run in multi-process mode, inter-process communication becomes a crucial link. Messagequeue is a way of inter-process communication in Linux. The concept and implementation of process communication in Linux can be
Wei shield PHP encryption expert decryption algorithm By: Neeao, encountered using Wei shield PHP encryption expert encryption code, you can use the following code to view the source file.
The code is as follows:
/**********************************
If you want to break through anti-Leech measures, you need to consider using HTTP_REFERER. Many websites use referer to determine whether to steal links. If you want to take measures to break through the anti-Leech protection, you need to consider
Most MySQL users have the AutoIncrement complex, but MongoDB is not implemented by default, so we need to simulate it. the programming language uses PHP as an example for MongoDB.
The code is roughly as follows:
The code is as follows:
Function
Mysqlslowlog is a log tool used to record SQL statements that have been executed for a long time (beyond long_query_time seconds) to enable slow log.
There are two ways to enable: 1, in my. in cnf, log-slow-queries [= file_name] 2 is used to specify
With the support of filefilereader, how to implement asynchronous file upload in php with Ajax technology makes asynchronous file Upload easier. (Previously, the form will be submitted to iframe for implementation) Ajax
1: Get the file object
2:
Php advanced programming-function-Zheng Achi. For more information about php learning, see. 1. php functions
1. user-defined functions
The code is as follows:
Function name ([$ parameter, [,…])
{
// Function Code
}
Note: the function name cannot
Akismet is an excellent plug-in that prevents Spam messages. most wordpressblogger is using it. with akismet, there is basically no need to worry about Spam messages. However, no one is perfect, and no plug-in is complete! Akismet is not perfect
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