当前位置:网站首页>addslashes,stripslashes
addslashes,stripslashes
2022-06-21 15:40:00 【51CTO】
官方介绍:
(PHP 4, PHP 5)
addslashes — 使用反斜线引用字符串
返回字符串,该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线。这些字符是单引号(’)、双引号(”)、反斜线(\)与 NUL(NULL 字符)。
PHP 5.4 之前 PHP 指令 magic_quotes_gpc 默认是 on, 实际上所有的 GET、POST 和 COOKIE 数据都用被 addslashes() 了。 不要对已经被 magic_quotes_gpc转义过的字符串使用 addslashes(),因为这样会导致双层转义。 遇到这种情况时可以使用函数 get_magic_quotes_gpc()进行检测。
那么,问题来了,现在使用php5.6,get_magic_quotes_gpc() 为 false,可是,直接获取$_POST的值,还是直接给转义了,这是为什么呢???
边栏推荐
- Torch utils. Data: analyze the whole process of data processing
- What is Objective-C ID in swift- What is the equivalent of an Objective-C id in Swift?
- Gee Registration Guide
- Rk3399 platform development series explanation (network debugging) 7.33 network performance optimization
- Go language - pointer
- C multithreading
- "I, an idiot, have recruited a bunch of programmers who can only 'Google'
- Goose factory, everything about ThreadLocal
- 【数论】leetcode1006. Clumsy Factorial
- Go language - Interface
猜你喜欢

WSL 2 的安装过程(以及介绍)

Native JS routing, iframe framework

Score-Based Generative Modeling through Stochastic Differential Equations

Go language - pointer

建立自己的网站(4)

2 万字 + 30 张图 | 细聊 MySQL undo log、redo log、binlog 有什么用?

Defcampctf2122 Forensics

【贪心】leetcode1005K次取反后数组后的最大值

2022awe opened in March, and Hisense conference tablet was shortlisted for the review of EPLAN Award

Baota, a well-known server operation and maintenance software manufacturer, joined dragon lizard community and completed compatibility and adaptation with Anolis OS
随机推荐
GO语言-指针
真香!十五分钟搞定智能标注、模型训练、服务部署……
[number theory] leetcode1006 Clumsy Factorial
R language uses file of FS package_ Access function, file_ Exists function, dir_ Exists function, link_ The exists function checks whether the file can be accessed, whether the file exists, whether th
Apple was fined by Dutch regulators, totaling about RMB 180million
Review: effects of repetitive transcranial magnetic stimulation rTMS on resting state functional connectivity
How can decentralized games attract traditional players?
高级性能测试系列《5.服务器的发展、vmware虚拟技术》
Select article (039) - when the button is clicked, event What is target?
What's wrong with the if judgment of pbootcms and the direct display of labels?
Typescript (6) function
MySQL memory tuning
20000 words + 30 pictures | what's the use of chatting about MySQL undo log, redo log and binlog?
关于#sql#的问题:sql中有人知道这些问题大概是怎么解答吗?
Representation learning of resting fMRI data based on variational self encoder
Research Report on the overall scale, major manufacturers, major regions, products and applications of high pressure gas supply system in the global market in 2022
Someone is storing credit card data - how do they do it- Somebody is storing credit card data - how are they doing it?
Dstream and its basic operating principle
Encryption market "escape": clearing, selling and running
最近学习的一些思考,附上答案,后续还需深入学习开发知识。