xdebug 在 phpize 时报错 Cannot find autoconf

问题描述为调试 php-7.4.6,下载了 xdebug,运行以下命令,最后报错了。$ wget http://xdebug.org/files/xdebug-2.9.6.tgz$ tar xf xd...
2020-06-10 Php 评论 0

PHP 编译错误 Package requirements (oniguruma) were not met

问题描述在 Linux/Mac 系统中,使用 PHP 7.4.6 调用 mb_convert_encoding,出现致命错误。Error Uncaught Error: Call to undefin...
2020-05-28 Php 评论 0

Linux 安装 PHP 出错 no acceptable C compiler found in $PATH when installing php

问题描述在 Linux 下安装 PHP 时,报错了,具体步骤如下:$ wget https://www.php.net/distributions/php-7.4.6.tar.gz$ tar xf p...
2020-05-19 Php 评论 0

PHP 列出指定目录下的所有文件的几种方法

下面列举使用 PHP,实现遍历指定文件夹下所有文件的几种方法。1. DirectoryIterator使用 DirectoryIterator 目录接口。使用 isDot() 方法确定当前项是 . 还...
2020-04-27 Php 评论 0

Windows 下 Apache 2.4 使用代理转发 PHP 请求出现 No input file specified

问题描述系统环境和软件版本:Windowns 10Apache httpd-2.4.41-win64-VS16php-7.4.5-nts-Win32-vc15-x64尝试结合 Apache 2.4 的...
2020-04-25 Php 评论 0

PHP 判断当前运行环境是否为 cli

判断 PHP 的当前运行环境是否为 cli 命令行模式,可以有2种方法。使用 php_sapi_name 方法获取php_sapi_name 返回 web 服务器和 PHP 之间的接口类型,返回的值包...
2020-04-22 Php 评论 0

PHP 检查文件夹是否为空

由于 PHP 的 rmdir 方法只能删除空文件夹,所以需要先判断文件夹是否为空。以下总结了2种检查文件夹是否为空的方法。1. 使用 scandir 方法scandir 方法会返回. 和 .. 2个元...
2020-04-19 Php 评论 0

查看php已安装扩展模块的几种方法

linux命令行下查看扩展是否开启使用 php -m 命令$ php -m [PHP Modules]bcmathCorectypecurldatedomeregfileinfofiltergdhas...
2019-12-27 Php 评论 0

PHP等比例缩放图片大小压缩图片空间

PHP做前后端图片上传的时候,经常需要做图片缩放处理。大部分是用了GD库和图像处理函数。下面一个简单的代码工具,实现了等比例缩放图片大小,使用背景颜色填充,同时,支持压缩图片质量,减少图片占用空间,支...
2019-12-05 Php 评论 0

php网站数据缓存

缓存的作用有很多工具可以提高网站的访问速度和性能。比如eAccelerator 和 APC,然而,这些都需要在网站的服务器上安装,比较麻烦。使用PHP编码,我们可以很方便地缓存一个网页,对于那些使用数...
2019-12-01 Php 评论 0
MIP.watch('startSearch', function (newVal, oldVal) { if(newVal) { var keyword = MIP.getData('keyword'); console.log(keyword); // 替换当前历史记录,新增 MIP.viewer.open('/s/' + keyword, {replace: true}); setTimeout(function () { MIP.setData({startSearch: false}) }, 1000); } }); MIP.watch('goHome', function (newVal, oldVal) { MIP.viewer.open('/', {replace: false}); });