拥有PHP标签的文章

阿里云Centos7 yum安装PHP7.2 LNMP环境配置 (centos7.6+nginx+MySQL5.7+PHP7.2)

首先更新系统软件$ yum update安装nginx1.安装nginx源:yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm2.安装nginxyum install ngin
阅读全文

编译php扩展

使用phpize编译扩展,如果phpize没有加入到环境变量的话,使用全路径,一般为:/usr/local/php/bin/phpize如果运行了phpize发现没有生成configure文件的话,说明没有安装autoconf,使用一下命令安装:yum -y install autoconf然后重新使用命令:phpize然后:./configure --wi
阅读全文

thinkphp5.0.24不加载extra文件夹下的扩展配置

  • Barley
  • 2019-02-21 16:08:54
  • PHP
  • PHP
如果发现config('xx');无法获取到设置的参数,但是config.php 里的参数又能正确获取的话: 去:thinkphp/library/think/App.php  文件的 260行左右将原来的:Config::load($filename, pathinfo($file, PATHINFO_FILENA
阅读全文

阿里云centos6开启 80 端口

iptables -I INPUT -p tcp --drop 80 -j ACCEPT
阅读全文

PHP date_modify() 函数

<?php $date=date_create("2019-01-30"); date_modify($date,"+4 days"); echo date_format($date,"Y-m-d");date_modify() 函数修改时间戳
阅读全文

PHP合并数组及去重

<?php  $arr1 = [1,2,3,4,5]; $arr2 = [1,2,3,6,7]; $arr3 = ['0'=>1,'1'=>2,'2'=>3,'3'=>4,'4'=>5]; $arr4&nb
阅读全文

PHP保留两位小数的几种方法

<?php  $num = 10.4567;       //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46   //第二种:利用sprintf格式化字符串 $format_num = sp
阅读全文

array_intersect_uassoc()函数

  • Barley
  • 2019-01-18 09:43:08
  • PHP
  • PHP
<?php function myfunction($a,$b) { if ($a===$b)   {   return 0;   }   return ($a>$b)?1:-1; } $a1=array("a"=>&q
阅读全文

PHP使用Apache中的ab测试网站的压力性能

打开Apache服务器的安装路径(我用的是 WampServer),在bin目录中有一个ab.exe的可执行程序,它就是要介绍的压力测试工具。在Windows系统的命令行下,进入ab.exe程序所在目录,执行ab.exe程序。注意直接双击无法正确运行。d:(回车/进入D盘)cd wamp\bin\apache\Apache2.4.4\bin(回车/进入 bin目录)ab(回车/)如果看到下列一些帮
阅读全文

thinkphp 3.2的cli模式(命令行模式)的正确使用方法

最近要使用thinkphp3.2版本的cli模式,手动执的话没有问题,比如php /www/index.php home/article/get这样没有问题,但是一般用cli模式都是定时任务比较多,这个时候写到定时任务的时候,比如0 * * * * * php /www/index.php home
阅读全文