zf框架 文件安全性检查

protected static function _securityCheck($filename)
{
/**
* Security check
*/
if (preg_match('/[^a-z0-9\\/\\\\_.:-]/i', $filename)) {
require_once 'Zend/Exception.php';
throw new Zend_Exception('Security check: Illegal character in filename');
}
}

posted @ 2015-06-24 09:55  b13272012771  阅读(140)  评论(0编辑  收藏  举报