欢迎光临
我们一直在努力

php怎么修复xss漏洞

使用php对xss漏洞进行修复,具体方法如下:

function search($query, $page)

{

global $db, $bgcolor2, $bgcolor4, $sitename, $io_db, $module_url, $list_page_items, $hm_index;

$option = trim($option);

$query = trim($query);

$query = FixQuotes(nl2br(filter_text($query)));

$db->escape_string($query);

$db->escape_string($option);

alpha_search($query);

$query = FixQuotes(nl2br(filter_text(htmlentities($query))));

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。