当前位置:网站首页>php 自带过滤和转义函数
php 自带过滤和转义函数
2022-07-07 14:07:00 【全栈程序员站长】
分类:
函数名 | 释义 | 介绍 |
|---|---|---|
htmlspecialchars | 将与、单双引号、大于和小于号化成HTML格式 | &转成&“转成"‘ 转成'<转成<>转成> |
htmlentities() | 所有字符都转成HTML格式 | 除上面htmlspecialchars字符外,还包括双字节字符显示成编码等。 |
addslashes | 单双引号、反斜线及NULL加上反斜线转义 | 被改的字符包括单引号 (‘)、双引号(“)、反斜线 backslash (\) 以及空字符NULL。 |
stripslashes | 去掉反斜线字符 | 去掉字符串中的反斜线字符。若是连续二个反斜线,则去掉一个,留下一个。若只有一个反斜线,就直接去掉。 |
quotemeta | 加入引用符号 | 将字符串中含有 . \\ + * ? [ ^ ] ( $ )等字符的前面加入反斜线 “\” 符号。 |
nl2br() | 将换行字符转成<br> | |
strip_tags | 去掉HTML及PHP标记 | 去掉字符串中任何 HTML标记和PHP标记,包括标记封堵之间的内容。注意如果字符串HTML及PHP标签存在错误,也会返回错误。 |
mysql_real_escape_string | 转义SQL字符串中的特殊字符 | 转义 \x00 \n \r 空格 \ ‘ ” \x1a,针对多字节字符处理很有效。mysql_real_escape_string会判断字符集,mysql_escape_string则不用考虑。 |
base64_decode | base64解码 | 对使用 MIME base64 编码的数据进行解码 |
base64_encode | base64编码 | 使用 MIME base64 对数据进行编码 |
rawurldecode | URL解码 | 对已编码的 URL 字符串进行解码 |
rawurlencode | URL编码 | 按照 RFC 1738 对 URL 进行编码 |
urldecode | URL解码 | 解码已编码的 URL 字符串 |
urlencode | URL编码 | 编码 URL 字符串 |
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113210.html原文链接:https://javaforall.cn
边栏推荐
- 喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
- Particle effect for ugui
- Xcode Revoke certificate
- Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
- 121. 买卖股票的最佳时机
- Iptables only allows the specified IP address to access the specified port
- How to determine whether the checkbox in JS is selected
- 10 schemes to ensure interface data security
- U3D_ Infinite Bessel curve
- Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
猜你喜欢

Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?

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

Wireless sensor networks -- ZigBee and 6LoWPAN

2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo

Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench

深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)
Notification uses full resolution

【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
随机推荐
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
Three. JS introduction learning notes 12: the model moves along any trajectory line
AB package details in unity (super detail, features, packaging, loading, manager)
Learn good-looking custom scroll bars in 1 minute
Three singleton modes of unity (hungry man, lazy man, monobehavior)
Detailed explanation of unity hot update knowledge points and introduction to common solution principles
Logback日志框架第三方jar包 免费获取
Odoo集成Plausible埋码监控平台
UE4 exports the picture + text combination diagram through ucanvasrendertarget2d
TS typescript type declaration special declaration field number is handled when the key key
hellogolang
用手机在通达信上开户靠谱吗?这样炒股有没有什么安全隐患
Three. JS introductory learning notes 18: how to export JSON files with Blender
hellogolang
Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?
Three. JS introductory learning notes 08:orbitcontrols JS plug-in - mouse control model rotation, zoom in, zoom out, translation, etc
喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
Shader_ Animation sequence frame
Three. JS introductory learning notes 11:three JS group composite object
Xcode Revoke certificate