当前位置:网站首页>PHP has its own filtering and escape functions
PHP has its own filtering and escape functions
2022-07-07 16:19:00 【Full stack programmer webmaster】
classification :
Function name | paraphrase | Introduce |
|---|---|---|
htmlspecialchars | Will work with 、 Single and double quotation marks 、 Greater than and less than sign into HTML Format | & Turn into &“ Turn into "‘ Turn into '< Turn into <> Turn into > |
htmlentities() | All characters are converted to HTML Format | Except above htmlspecialchars Out of character , It also includes the display of double byte characters as encoding . |
addslashes | Single and double quotation marks 、 Backslash and NULL Escape with backslash | The changed characters include single quotation marks (‘)、 Double quotes (“)、 Backslash backslash (\) And empty characters NULL. |
stripslashes | Remove the backslash character | Remove the backslash character from the string . If there are two consecutive backslashes , Then remove one , Leave one . If there is only one backslash , Just get rid of it . |
quotemeta | Add reference symbols | Include... In the string . \\ + * ? [ ^ ] ( $ ) Add a backslash in front of the characters such as “\” Symbol . |
nl2br() | Convert newline characters to <br> | |
strip_tags | Get rid of HTML And PHP Mark | Remove any HTML Labelling and PHP Mark , Including the contents between marking and plugging . Note that if the string HTML And PHP There is an error in the label , It also returns an error . |
mysql_real_escape_string | escape SQL Special characters in string | escape \x00 \n \r Space \ ‘ ” \x1a, It is very effective for multi byte character processing .mysql_real_escape_string Can judge the character set ,mysql_escape_string You don't have to consider . |
base64_decode | base64 decode | To use MIME base64 Decode the encoded data |
base64_encode | base64 code | Use MIME base64 Code the data |
rawurldecode | URL decode | For encoded URL String decoding |
rawurlencode | URL code | according to RFC 1738 Yes URL Encoding |
urldecode | URL decode | Decode the encoded URL character string |
urlencode | URL code | code URL character string |
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113210.html Link to the original text :https://javaforall.cn
边栏推荐
- laravel中将session由文件保存改为数据库保存
- Three. JS introductory learning notes 19: how to import FBX static model
- leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
- Markdown formula editing tutorial
- Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- 95. (cesium chapter) cesium dynamic monomer-3d building (building)
- iptables只允许指定ip地址访问指定端口
- IP地址和物理地址有什么区别
- What are compiled languages and interpreted languages?
猜你喜欢

Plate - forme de surveillance par étapes zabbix

95. (cesium chapter) cesium dynamic monomer-3d building (building)

Step by step monitoring platform ZABBIX

谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题

JS array foreach source code parsing

统计学习方法——感知机

无线传感器网络--ZigBee和6LoWPAN

Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?

SPI master rx time out中断

MySQL数据库基本操作-DQL-基本查询
随机推荐
What else can an ordinary person do besides working in a factory to make money?
The unity vector rotates at a point
Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)
Unity3d click events added to 3D objects in the scene
How to determine whether the checkbox in JS is selected
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
leetcode 241. Different ways to add parentheses design priority for operational expressions (medium)
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
Xcode Revoke certificate
three.js打造酷炫下雪效果
C4D learning notes 2- animation - timeline and time function
What are compiled languages and interpreted languages?
企业级日志分析系统ELK
Numpy --- basic learning notes
招标公告:福建省农村信用社联合社数据库审计系统采购项目(重新招标)
A JS script can be directly put into the browser to perform operations
121. 买卖股票的最佳时机
Particle effect for ugui
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
[excelexport], Excel to Lua, JSON, XML development tool