维多利亚睡莲上的绿鹭,潘塔纳尔 ,巴西 (© Gerald Corsi/Getty Images)

2020年1月

January 22, 2020

linux下php拓展安装方法

linux下php有多种方式来安装拓展, 主要有包管理式的安装、pecl 安装和源码编译安装。 包管理式的安装卸载尤为方便,而源码编译式的安装则方便参数调优。一般搭建本机开发环境推荐包管理式的安装,节约时间。而线上部署环境则推荐编译安装, 方便调优。本文以CentOS下\`MongoDB 扩展安装举例。yum安装yum方式安装能自动安装拓展的.so动态库,并配置好php.ini 注: 1. ...
January 21, 2020

sed删除文件中包含指定字符串的行

删除文件中含特定字符串的行:sed -e '/abc/d' a.txt // 删除a.txt中含"abc"的行,但不改变a.txt文件本身,操作之后的结果在终端显示 sed -e '/abc/d' a.txt > a.log // 删除a.txt中含"abc"的行,将操作之后的结果保存到a....
PHP
January 19, 2020

CentOS安装php7

当前环境:CentOS 7.6(x64)卸载旧版本rpm -qa | grep php yum -y remove php-5.4.6添加源# epel源 yum list installed | grep epel yum install epel-release yum-utils # remi源 yum list installed | grep remi yum install h...
January 19, 2020

CentOS安装Postgresql

当前环境: CentOS 7.6(x64)安装# 添加库 yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # 安装包 yum install postgresql12 postgresql12-server ...
PHP
January 9, 2020

PHP之pdf预览

header("Content-type: application/pdf"); header("Content-Disposition:inline;filename='preview.pdf'"); readfile($path);