使用php扩展trie_filter,利用词库,过滤敏感词
2016-06-24 09:48
741 查看
----------先安装libiconv
#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
#tar -zxvf libiconv-1.13.1.tar.gz
#cd libiconv-1.13.1
# ./configure --prefix=/usr/local/libiconv
# make
# make install
----------再安装libdatrie
cd /userfile/
ls
xz -d libdatrie-0.2.10.tar.xz
tar xvf libdatrie-0.2.10.tar
cd libdatrie-0.2.10
make clean
./configure --prefix=/usr/lib/libdatrie/ --with-libiconv=/usr/lib/libiconv
make && make install
cd /userfile/php-ext-trie-filter-master/
/alidata/server/php-5.3.29/bin/phpize
./configure --with-php-config=/alidata/server/php-5.3.29/bin/php-config --with-trie_filter=/usr/lib/libdatrie
make && make install
/etc/init.d/php-fpm restart
/etc/init.d/nginx restart
#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
#tar -zxvf libiconv-1.13.1.tar.gz
#cd libiconv-1.13.1
# ./configure --prefix=/usr/local/libiconv
# make
# make install
----------再安装libdatrie
cd /userfile/
ls
xz -d libdatrie-0.2.10.tar.xz
tar xvf libdatrie-0.2.10.tar
cd libdatrie-0.2.10
make clean
./configure --prefix=/usr/lib/libdatrie/ --with-libiconv=/usr/lib/libiconv
make && make install
cd /userfile/php-ext-trie-filter-master/
/alidata/server/php-5.3.29/bin/phpize
./configure --with-php-config=/alidata/server/php-5.3.29/bin/php-config --with-trie_filter=/usr/lib/libdatrie
make && make install
/etc/init.d/php-fpm restart
/etc/init.d/nginx restart
相关文章推荐
- php输出缓冲区
- PHP Framework
- php的json_encode不兼容JSON_UNESCAPED_UNICODE
- 最简单的php验证码
- PHP学习笔记
- PHP 连接mysql数据库
- 本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试
- php的类型转换
- php scandir函数,print_r函数的问题
- [李景山php]每天laravel-20160907|Dispatcher-7
- [李景山php]每天laravel-20160907|Dispatcher-7
- GetProcessMemoryInfo函数
- php 练习题-留言板
- PHP设置头信息,取得返回头信息
- laravel-users表添加手机号
- laravel数据库迁移
- thinkphp3.2【自动加载】
- 一个简单安全的PHP验证码类 附调用方法
- php模拟post上传图片实现代码
- php自动载入类用法实例分析