PHP input sanitizer?

后端 未结 4 924
余生分开走
余生分开走 2021-01-06 07:47

What are some good PHP html (input) sanitizers?

Preferably, if something is built in - I\'d like to us that.

UPDATE:

Per the request

4条回答
  •  孤城傲影
    2021-01-06 08:00

    I've always used PHP's addslashes() and stripslashes() functions, but I also just saw the built-in filter_var() function (link). Looks like there are quite a few built-in filters.

提交回复
热议问题