
php
文章平均质量分 65
JoXu
这个作者很懒,什么都没留下…
展开
-
安装swoole, php.h不存在:Big Sur 安装php扩展报错
参考:https://profilingviewer.com/installing-xdebug-on-bigsur.html#build中文参考:https://l1905.github.io/php/2020/02/28/macos-pecl-xdebug-mongodb/转载 2021-03-01 10:47:12 · 605 阅读 · 1 评论 -
防止xss攻击的方式
1.原生php中对xss攻击进行防范,使用htmlspecialchars函数,将用户输入的字符串中的特殊字符,比如<> 转化为html实体字符。2.过滤的思想:将输入内容中的script标签js代码过滤掉。特别在富文本编辑器中,输入的内容源代码中,包含html标签是正常的。不能使用htmlspecialchars进行处理。如果用户直接在源代码界面输入js代码,也会引起xss攻击。通常使用htmlpurifier插件进行过滤说明:htmlpurifier插件,会过滤掉scr.原创 2020-12-01 20:02:19 · 668 阅读 · 1 评论 -
nginx安装ci,开启pathinfo模式
1.根据教程安装:http://codeigniter.org.cn/user_guide/installation/index.html2.修改nginx配置:server { listen 80; server_name localhost; rewrite_log on; #根目录 root /u原创 2015-12-10 15:09:02 · 2318 阅读 · 0 评论 -
PDO:数据库中有数据但是查询不出数据
<?phpheader("Content-type:text/html; charset=utf-8");$dbms = "mysql";$dbName = "test";$user = "root";$pwd = "111111111";$host = "127.0.0.1";$dsn = "$dbms:host=$host;dbName=$dbName";try { ...原创 2019-08-21 15:19:50 · 1353 阅读 · 0 评论