Form verification-verify user data (from the browser, get, post ). The javascript and php regular expressions are used for joint processing. String functions: a small number of common strings are processed by string processing functions in bytes. Gbk encoding: one Chinese character occupies 2 bytes. Utf8 encoding: one Chinese character occupies 3 bytes. Strlen (); length Substr (string, start position, truncation length): the truncation string is processed according to characters. For example, javascript strings are processed by characters. Php does not support character processing by default. you need to use php's multi-byte character extension. In Php. ini: Mb_strlen (); Mb_substr (); regular expressions: Batch string processing, regular expressions. Check whether the data entered by the user is in the email address? Whether a string rule is met. Common use of regular expressions: form verification-user data verification (from the browser data, get, post ). The javascript and php regular expressions are used for joint processing.
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