414   Composer Laravel PHP

laravel5,html过滤器,防止xss攻击,mews purifier
地址:
https://github.com/mewebstudio/purifier

1,添加类库

composer require "mews/purifier:~2.0"

2,使用:


$post->content = Purifier::clean($all['content'],'simditor');

其中’simditor’是在config/purifier.php配置文件下配置的




Leave a Reply

Your email address will not be published. Required fields are marked *