Personal notes ... For reference, if wrong please point out, thank you
The code is as follows
Copy Code
/******************************************* Class object Instance description (normal Class) ***********************
1.cookie&session Introduction and differences
The cookie data is saved on the client and the session data is saved on the server side.
Simply put, when you log on to a Web site, if the Web server side is using session, then all the data is stored
The scope of the variables in PHP is described in the PHP manual
In a user-defined function, a local function range is introduced. Any variable that is used inside a function is limited by default to the scope of the local function. For example:
Magic method is a two underline "__" The beginning, has a special role of some methods, can be seen as PHP's "grammatical sugar."
Grammatical sugars are grammars that do not add new functionality to computer languages but are more "sweet" to humans.
PHP server-side default session storage is the way in which files are stored, and on WINDOWS, PHP's default sessions server file is stored under C:/windows/temp, *nix under the default storage in/TMP, If concurrent access is large or the session is
Pcntl the extensions that the PHP implementation multi process must install, the extended installation steps are now written below.
One or two kinds of installation methods
1, recompile PHP's back configrue hint plus? enable-pcntl.2, do not
Gets the specified year date into the timestamp:
PHP timestamp function gets the UNIX timestamp strtotime of the specified date (' 2012-12-7 ')
Examples are as follows:
The code is as follows
Copy Code
0x00 Preface
Today we'll discuss writing a backdoor based on the PHP extension library. Typically, most intruders leave a custom code block back door in the script. Of course, these things can easily be found through static or dynamic analysis of
Use regular filter HTML tags
The code is as follows
Copy Code
$html _body = "www.111cn.net";Preg_replace ("/(]*>)/e ","' \1 '. Strtoupper (' \2 ')." \3 ' ",$html _body);
Using PHP tutorial with function
Author: Lao Wang
Getter/setter usage is common in the Java community, such as in entity beans or DTO, which is sometimes necessary and sometimes tedious. The PHP community is generally crawling along the steps of the Java community, so many people
The source code for PHP files is plaintext, which is not suitable for some commercial purposes.
So consider using encryption to protect the source code.
It's really impatient to wait for Zend out of the compiler, and compilation and encryption are
*/Require_once ('Common/email. class. Php '); The code is as follows:Copy code // Here in the smiley_face@126.com mailbox as an example, the user needs to modify$ Smtps tutorial erver = "smtp.126.com"; // smtp server$ Smtpserverport = 25; //
PHP Smarty template-what is Smarty?Smarty is a PHP template engine written using PHP. It is one of the most famous PHP template engines in the industry. It points Smarty of phpApart from logical code and external content, it provides an
Bool array_multisort (array ar1 [, mixed arg [, mixed... [, array...])If the call succeeds, TRUE is returned. If the call fails, FALSE is returned.Array_multisort () can be used to sort multiple arrays at a time, or to sort multi-dimensional arrays
This article does not discuss session or cookie. Many websites now talk about cookie-based session. The advantages and disadvantages of cookie-based session are discussed below:Advantages:1. Reduce the pressure on the server. For example, PHP
Use WEB servers to implement PHP multithreading.Of course, anyone who has a deep understanding of multithreading knows that multithreading implemented through WEB servers can only imitate some of the effects of multithreading, not in the true
Flock-lightweight consultation file lockingFlock () function prototypeBool flock (int handle, int operation [, int & wouldblock])PHP supports a lightweight method of locking all files in consultation (that is, all access programs must be locked in
For php exceptions, you can get the error stack through getTraceAsString.The error should be as follows: The code is as follows:Copy code Function x ()$ X = debug_backtrace ();// Remove stack of this functionArray_shift ($ x );$ I = 0;$ Xstr = ''
Calculate the average value of an array. Calculate the average value of a two-dimensional array. The code is as follows:Copy code $ Array = array (Array ('class' => 'A', 'value' => 3 ),Array ('class' => 'A', 'value' => 4 ),Array ('class' => 'B',
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