/**
 * 过滤用户输入的基本数据,防止script攻击
 *
 * @access      public
 * @return      string
 */
function compile_str($str)
{
    $arr = array('<' => '<', '>' => '>','"'=>'”',"'"=>'’');

    return strtr($str, $arr);
}

 

相关文章:

  • 2021-10-22
  • 2021-06-06
  • 2021-12-22
  • 2021-05-24
猜你喜欢
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2021-07-18
  • 2021-08-17
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案