A custom function
The code is as follows
function striphtml ($string) { $pattern =array (" ' Si "," '
]*?>.*? ') Si "," ' ]*?> ' si ', "' ([RN]) [s]+ '", "' & (quot| #34); ' I "," ' & (amp| #38); ' I "," '
5.3 can be implemented before, but the code is more cumbersome, as follows:
Class Morder extends smodel{protected static $handle; Single example handlePrivate Function __construct () {Something}/*** The method of obtaining this type of singleton,
Copy CodeThe code is as follows:
$text = ' The one is not able to be good all the time, but also to do when you want to see the text without opening the hand of ten with the main line and as before the craniofacial of the same three have been old
Introduction to PHP Filter
PHP filters are used to validate and filter data from non-secure sources, such as user input.
Copy CodeThe code is as follows:
Remove HTML tags, or remove encoded special characters
Var_dump (Filter_var ("Chinese
Cases
if (Isset ($_server[' Http_x_rewrite_url '))//IIS
else if (isset ($_server[' orig_path_info '))//IIS 5.0 CGI
The above two lines of code, in Yii, is the same as the back.
For reference only
http://www.bkjia.com/PHPjc/727591.html
1, using curl to achieve off-site acquisition
For details, please refer to my previous note: http://www.jb51.net/article/46432.htm
2. Code ConversionFirst, by looking at the source code to find the site used by the code, through the
In a.php the data is submitted to b.php in POST, but the b.php is unable to receive the data, and the CURL operation shows success, very strange. Originally, "Passing an array to Curlopt_postfields,curl will encode the data into Multipart/form-data,
This has been a long time, more than PHP comes with the var_dump more useful.
Copy CodeThe code is as follows:
function dump ($vars, $label = ", $return = False) {
if (Ini_get (' html_errors ')) {
$content = "
$content. = "{$label}:$content. = "\ n\
For example, your original path is http://localhost/test/index.php/index/add.
So now the address is http://localhost/test/index/add.
How to get rid of index.php?
1, httpd.conf configuration file loaded mod_rewrite.so module//in Apache to
Background
or college and professional relationships, I need to keep clicking the Submit button after the page select continues to maintain the pre-commit value
There are several ways on the web, either via the URL when the parameter is returned
The basic elements in modern programming languages are: variables, flow control interfaces, functions, and so on. Can I write a program without using variables? This is obviously possible, for example:
Copy the Code code as follows:
echo "Hello
Very simple.
HTML page
It? ') {rentrn true;} return false;} " ><>
PHP file
([' Do ']==[' id '] = "Delect from database where id =". ->executenonequery ( ""
http://www.bkjia.com/PHPjc/729833.html www.bkjia.com true
Copy CodeThe code is as follows:
Header ("CONTENT-TYPE:TEXT/HTML;CHARSET=GBK");
Ini_set ("Date.timezone", "Asia/chong");
Determine if the file is empty
if (empty ($_files)) {
echo "Upload file too large";
Exit
}
Determine if the file upload has
Today when you put a set of programs on the other server execution, found that the background login verification code, regardless of whether the input is correct, always show:
Incorrect verification Code input
Then it started debugging.
If you need PHP to execute some shell commands to view the results, if the shell output has Chinese, then PHP will get a Chinese return result similar to the "? \230?\180?\187?\229?\138?\168" string. Then this function needs to be translated:
Copy
The timing of the server generated thumbnails is generally divided into two types: When the file is uploaded, generated during the visit, the following is a description of PHP based on the URL to automatically generate thumbnails and handle high
\ n Soft return:
Represents a newline in windows and returns to the beginning of the next line. Equivalent to the \ r effect in Mac OS.
In Linux, Unix only represents line breaks, but does not go back to the beginning of the next line.
\ r Soft
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