Strip_tags function
Strip_tags---To remove html and PHP tags from strings
Syntax: string strip_tags (String str [, String allowable_tags])
Cases
The code is as follows
Copy Code
$text = ' test paragraph. other text
Learning Purpose: Make a paging display
The key is to use the limit in the SQL statement to qualify the displayed records from several to several. We need a variable $page that records the current page and a total number of records $num
For $page
JavaScript form validation is Chinese, determines whether an input is Chinese and is implemented through regular expressions.Check to see if it is Chinese
function Ischn (str) {
var reg =/^[u4e00-u9fa5]+$/;
if (!reg.test (str)) {
return false;
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)) {The echo ' string has Chinese ';}else{The echo ' string has no
A lot of the time we just clear the HTML tag but always want to keep some of the tags
Implemented in ASP language
code is as follows
copy code
str= "a.htmafefefeaabbb ggg test " Set re=new regexp re.
Definition and usageThe filter_var_array () function obtains multiple variables and their selected filters.This function is useful in filtering many values that do not require filter_var (), many.Returns an array of values required for the success
Definition and usageThe str_shuffle () function randomly shuffles all character strings.SyntaxStr_shuffle (string)ParameterDescriptionStringString required. Specify string shufflingLet's take a look at the str_shuffle function tutorial. Output
PHP array_push () function example tutorial and usageDefinition and usageThis array_push () function inserts an array at the end of one or more elements.SyntaxArray_push (array, value1, value2 ...)Parameter descriptionArray required. Specify an
Php file_get_contents function,This function is used to read the content of the remote server file, which greatly facilitates the collection of friends. You can save the remote server file to your own database with a simple sentence, you can't
After the PHP function tempnam () is disabled, tempnam () can create a temporary file, and the file name will not be overwritten with the file in the same directory.The returned string is the temporary file name. If an error occurs, an empty string
About imagickImagick, which can be used by PHP to call the PHP extension of the ImageMagick function. With this extension, PHP can have the same functions as ImageMagick. You can use the APIs provided by ImageMagick to create and modify images.
The code is as follows:Copy code user registration last name: Password: Confirm password: email: Telephone: address: The code is as follows:Copy code // Initialize the sessionSession_start ();// Contains the database tutorial
/*Paging is very simple. Next we will mainly talk about paging principles and implementation methods.*//*In this way, we can know several pages.For example, if the result of a list is 126 rows and 20 rows on one page are divided into 7 pages,
The code is as follows:Copy code Header ("content-type: text/html; charset = utf-8 ");?> // Uploadaction. php The code is as follows:Copy code Header ("content-type: text/html; charset = utf-8 ");If (! Empty ($ _ files )) {$ Date = date
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