可能重複:
What are the best practices for avoid xss attacks in a PHP siteXSS預防PHP
我需要防止在PHP代碼XSS攻擊,是有否好,易庫呢?
可能重複:
What are the best practices for avoid xss attacks in a PHP siteXSS預防PHP
我需要防止在PHP代碼XSS攻擊,是有否好,易庫呢?
htmlspecialchars()
http://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API
很多關於谷歌很好的答案,我第一個發現的PHP:該項目的當前版本不適合生產使用。 – qwertzman 2012-08-24 13:34:50
有很多PHP函數可以幫助您防止XSS攻擊。看看這些:
strip_tags
http://php.net/manual/en/function.strip-tags.php
htmlspecialchars
我也注意到了,它阻止警報;( 'XSS攻擊測試!')從運行,所以它必須做點什麼 – newbie 2010-04-16 10:33:51
這將使unicode字符無法讀取(п=> п) – 2013-11-28 16:30:16