When you see the error prompt
Syntax error, unexpected t_encapsed_and_whitespace, expecting t_string or t_variable or t_num_string
This hint is a question that prompts the variable to use it.
And what I'm showing is that the array was used in the
Very helpless, did not think of any good way, then a flash. Put a PHP page, which can be directly bounced back to the shell, not to mention in the console under the operation than Webshell more convenient, there will be no timeout and so on.
Because
Copy Code code as follows:
* * A new PHP word Cmdshell (not a word trojan)
Principle: PHP Runtime if meet the character ' (keyboard ~ symbol of the next key) will always try to execute the "" contained in the command, and return the results of
The Pcntl_fork () function is to create a child process for the current process. and run the parent process first, and return the PID of the child process, definitely greater than 0. The parent process can be paused in the code of the parent process
Copy Code code as follows:
/**
* Images class is a picture processing class
* @package Application.controllers
* @since 1.0
*/
Class Images
{
/**
* Zoom Picture
* @param $source Original picture
* @param $newfile New pictures
*
From decimal to other transformations, the remainder is read by dividing the number into the number of numbers that are being converted. The connection is OK.
0)
{
$t = $arr [$num% $bin]. $t;
$num =floor ($num/$bin);
Put it in a common call file (such as a conn database link file), filter a special string for all get or post data to achieve a simple and efficient SQL injection filter
Copy Code code as follows:
Function Inject_check ($sql _str) {
This section shares the PHP code, the main features:Gets the physical (MAC) address of the machine's network card.Code:
Copy Code code as follows:
/**
* Obtain the physical (MAC) address of the Machine network card
* Currently
PHP uses Preg_match to match and determine whether a string contains Chinese or Chinese in the following ways:
$str = ' php learning blog ';
if (Preg_match ('/[\x7f-\xff]/', $str)) {
in the echo ' string there is a Chinese ';
} else{
echo '
Copy Code code as follows:
/* PHP to extract any attribute in the IMG tag of the picture.
$str = " PHP to extract or change the image in the IMG tag any property ';
1, take the whole picture codePreg_match ('/]*?src\s*=\s* (\ ' |\ ') (.
Introduced
I found a problem to share with you today. I'll describe the whole process.
Problem: The company has a framework is based on Smarty, I am responsible for the upgrade of PHP, the maintenance staff to the new environment cloth, the tester
Can be resolved:
Set_time_limit (900);
This function specifies the maximum execution time for the current PHP script.
Although the set value is 900 seconds, in fact
Maximum execution time =php.ini max_execution_time value-time + Set value of current
The detailed code is as follows:
Copy Code code as follows:
Abstract class Filter {//filter parent class
Private $blackstr = Array ();
Private $whitestr = Array ();
function Filtit ($STR) {
Do something
}
}
Class Loginfilter
Copy Code code as follows:
/*
Author:nick
date:2009.05.17
Function: Generate Selettree
Property:
$result result set
$id _field Self ID field
$parent _field parent class ID field
$option _text Option Display Name
$select the name of the
Copy Code code as follows:
/* Vim:set expandtab tabstop=4 shiftwidth=4: * *
// +------------------------------------------------------------------------
Name: Weight Calculation
Description: Slightly modified, can also be used for participle,
1. Modify the php.ini to remove Extension=php_mssql.dll annotations from the save.
Modify Php.in to change mssql.secure_connection = off to Mssql.secure_connection = on.
2. Download Connection 2005 Ntwdblib.dll (2000.80.194.0)
Click to download
GBK Code Interception Example
Copy Code code as follows:
$str = ' Who I am '; GBK encoded strings
Echo mb_substr ($str, 0, 1, ' GBK '); Output me
The Mb_substr method has one more parameter than substr to specify the string
In PHP, check if a link exists, there are two methods, one is to use curl, and the other isGet the response code for the header of HTTP, if 200 is OK, if it is 404, you can't find it, examples are as follows:
1) Using Get_headers:
The 2
Sometimes the foreground page allows you to dynamically add/Remove multiple values for an attribute, such as adding a book to the bookshelf, to dynamically add or remove books. There are multiple input elements in the form on the foreground page, as
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