Remove empty character elements from an array
Copy CodeThe code is as follows:
$str 1_array=array (' Home of the script ', ' ', ' http://www.jb51.net ', ' ', ' 1654 ', ');
$str 1_array=array_filter ($str 1_array);
Print_r ($str 1_array);
?>
Show
Script House Note:
Theoretically the following method can be, but the premise is to ensure that your PHP configuration is not error, we recommend that you use the new version of PHP, with the DISCUZ program, related server related software can be
Conversion of text Encoding mb_convert_encoding ()
Mb_convert_encoding ($str, $encoding 1, $encoding 2)
$str, to convert the encoded string
$encoding 1, the target code, such as UTF-8,GBK, is case-sensitive
$encoding 2, the original code, such as
The following code: Three cookies can be generated under Chrome and Firefox:
Cookie[one], Cookie[two], Cookie[three]
Under IE, only cookie[one], Cookie[two] Two cookies can be generated, and the third one because ". 65.la" was specified, resulting
Core code:
Copy CodeThe code is as follows:
Header ("Expires:mon, Jul 1997 05:00:00 GMT");
Header ("last-modified:". Gmdate ("D, D M Y h:i:s"). " GMT ");
Header ("Cache-control:no-cache, must-revalidate");
Header ("Pramga:no-cache");
This is
Introduction to forged cross-site requests
Forged cross-site requests are more difficult to guard against, and they can be a great hazard, such as mischief, spam information, data deletion, and so on. Common manifestations of this attack are:
Forge
This looks more humane, okay, on the code
Copy CodeThe code is as follows:
Class Timeago
{
Static $timeagoObject;
Private $rustle;
Private $unit;
Private Function __construct ()
{
}
Private Function __clone () {}
public static function GetObject ()
It's easy to think of it as an XML document at first. Just see how inefficient XML is.
Another is a different template, but there is a small problem, some words such as time hints are uncertain, and may be minute, day. It's also possible that the
Copy CodeThe code is as follows:
Convert numbers to kanji, such as 1210 to 1210
$num = "842105580";//Nine digits
function Del0 ($num)//Remove 0 in front of the number field
{
Return "". Intval ($num);
}
function n2c ($x)//single digit variable kanji
shopcar.php
Copy CodeThe code is as follows:
Class Shopcar
{
Product List
Public $productList =array ();
/**
*
* @param unknown_type $product in the product
* @return True there is no item in the cart
*/
Public Function checkproduct
The app enables instant counting of input words, and interacts with the background via AJAX to insert the input into the topic list. I have divided the whole process into two parts, this article explains the first part of jquery implementation of
Copy CodeThe code is as follows:
Class MySQL
{
Private $db; Datebase Connect
Private $result; MySQL result
static private $mysql; MySQL Object
Private Function __construct ()
{//the work before Create a object
$this->db = mysql_connect (' localhost '
Remove HTML Tags
Copy CodeThe code is as follows:
$text = Strip_tags ($input, "");
The above function is mainly used strip_tags, the specific use of the instructions reference.
Returns the text between the $start and the $end
Copy CodeThe code
Code:
Copy CodeThe code is as follows:
$page =$_get[' page ';
Include ($page. ' php ');
?>
You can use this
http://www.xxx.com/index.php?page=../etc/passwd
http://www.xxx.com/index.php?page=../../../etc/passwd
http://www.xxx.com/index.php?page=..
Rsort () Definition and usageThe Rsort () function reverses the order of the elements of the array by key values. The function is basically the same as Arsort ().
Note: This function assigns a new key name to the cells in the array. This will
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