问题描述
我正在开发基于php mysql和html的项目,因为我使用更安全的方法来验证登录信息,而不仅仅是获取post变量并将其与数据库进行比较我来自不同的函数,如
isset()
空()
stripslashes()
i得到它直到isset和空,但是当使用stripslashes时,我没有做对,据我所知, stripslashes()的目的是删除任何额外的
''" /和\等
但是当我尝试使用它并在用户名输入字段中我输入了
\omer 并尝试在使用stripslashes后回显它($ _ POST [''FIELD_NAME'']);它仍然显示 \" 在其中
我的代码在这里
是的我也很感激为什么它不起作用但现在我在我的代码中做了一些修改它是
hi there i am working on a project based on php mysql and html now as i was using an more secure method to authenticate login information than simply getting the post variables and comparing it with the data base i came accross different functions like
isset()
empty()
stripslashes()
i got it right till isset and empty but when working with stripslashes i am not getting it right ,as far as i know that the purpose of stripslashes() is to remove any extra
'' " / and \ etc
but as i tried to use it and in username input field i entered
\omer and tried to echo it after using stripslashes($_POST[''FIELD_NAME'']); it still shows the" \ " in it
My code is here
yeah i am also surpeised that why isnt it working but now i have made some ammendments in my code here it is
这篇关于如何使用stripslashes()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!