In the work need to deal with multi-lingual translation problems, translation is written in the Excel table. I will keep both the Chinese and English columns for the convenience of processing.
This requires that the data be taken out of Excel, and
Copy CodeThe code is as follows:
/**
* Remove HTML tags
*
* @access Public
* @param string str
* @return String
*
*/
function deletehtml ($STR) {
$str = Trim ($STR); Clear spaces on both sides of a string
$str = Strip_tags ($str, "
"); Use PHP's own
Brief introduction:Ajax is made up of HTML, javascript™ technology, DHTML, and DOM, an excellent way to turn a clumsy web interface into an interactive Ajax application.
For Ajax, one of the core objects is XMLHttpRequest, and all AJAX operations
1, the basic principle of PHP injectionProgrammer's level and experience are also uneven, a large part of the programmer in writing code, the user does not judge the legality of input data, so that the application has a security risk. The user can
First, close the default_charset in PHP config file php.ini:
1. Page does not specify CharSet, Apache configuration defaultcharst GBK, page file encoding is Utf-8Result: garbled, using Wireshark to grab the packet, found that the server returned
Maybe you know, maybe you don't know that PHP is a weak type, dynamic scripting language. The so-called weak type, that is, PHP does not strictly verify the variable type (strictly speaking, PHP is a medium-strong type language, this part will be
A few days ago began to run a data list, list needs to provide user name, whether there is a mobile phone number, whether there is a mailbox, user list I easily get to, but, the user list has more than 2000w, and to detect whether the user has a
Test the OB cache and program cache below:In order to test the results more clearly before testing, we php.ini the OB cache and set a clear level of error.
Output_buffering=offDisplay_errors=on
Code Listing 1:
The code is as follows:
echo "PHP";
Let's start with an example:For example, you'll get a function that returns these kinds of situations:
1, more than 0 of the number
2, less than 0 of the number
3, equals 0 of the number (that is, 0)
4, False (On Failure)
At this time if you want to
For PHP references (that is, variables or functions, objects, etc., preceded by the & symbol), let's look at the following procedure.
Copy CodeThe code is as follows:
$a = 100; Declaring variable A
$b = & $a; Declaring variable B, referring to
is not accustomed to the variable scope in PHP, PHP function variables and the global is completely isolated, that is, cannot access each other.
such as the following:
Copy CodeThe code is as follows:
$test = 123;
ABC (); Nothing is output here,
Copy CodeThe code is as follows:
Echo ' abc '. Def '; Concatenate strings with dot numbers
Echo ' abc ', ' Def '; Concatenate strings with commas
So here are some examples. To identify the difference between them.
Copy CodeThe code is as
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
Some of these PHP concepts are just beginning to be difficult to understand, I have listed them, hoping to help some people, on the way forward less thorns.
1. Variable variables (variable variable)
variable_variables.php
Copy the Code code as
There are many load balancing algorithms available for server load balancing, including round robin (Round Robin), hashing (hash), least-connection (Least Connection), Response-Speed algorithm (Response time), Weighted method (Weighted) and so on.
The contents of the $_files array are as follows:$_files[' myFile ' [' Name '] The original name of the client file.
The MIME type of the $_files[' myFile ' [' type '] file requires the browser to provide support for that information, such as "Image/
PHP prevents the form from repeating the instance submission:
Copy CodeThe code is as follows:
Session_Start ();
$_session[' fsess ']= ($_session[' fsess '])? $_session[' Fsess ']:time ();
?>
Prevent forms from repeating
Many novice in the process of the project, will encounter such a situation, such as: The Forum coin project, the user pay forum currency if suddenly broken network, computer crashes, power outages, and other natural disasters, resulting in this
Rewritecond, like the IF statement in our program, means that if one or a few conditions are met, the Rewriterule statement immediately below the Rewritecond is executed, which is Rewritecond's most primitive and basic function, for convenience of
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