随笔分类 -  php

上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要:多版本php,在php7.2的环境下安装composer 需设置.composer 文件夹权限,须到安装项目路径下安装 注意 设计到php,都是跟着php7.2的安装配置路径走的; 下载命令: curl sS https://getcomposer.org/installer | /usr/loca 阅读全文
posted @ 2019-12-25 20:57 盘思动 阅读(2411) 评论(0) 推荐(0) 编辑
摘要:realpath 返回绝对路径。 该函数删除所有符号连接(比如 '/./', '/../' 以及多余的 '/'),返回绝对路径名。 若失败,则返回 false。比如说文件不存在的话。 阅读全文
posted @ 2019-12-25 10:44 盘思动 阅读(307) 评论(0) 推荐(0) 编辑
摘要:1.下载yaf扩展库源码安装包 官网下载页面:http://pecl.php.net/package/yaf 2.下载yaf扩展库源码安装包 wget -c http://pecl.php.net/get/yaf-3.0.7.tgz 3.解压yaf扩展yaf-3.0.6.tgz包 tar -xzvf yaf-3.0.6.tgz cd yaf-3.0.6 4.生成编译configure配置文件 su 阅读全文
posted @ 2019-12-24 10:01 盘思动 阅读(722) 评论(0) 推荐(0) 编辑
摘要:多PHP版本只支持LNMP模式,LNMPA、LAMP模式下不支持!要使用多PHP先安装多PHP版本,在lnmp1.4源码(lnmp1.3的不行哦)目录下运行:./install.sh mphp 按提示选择要另外安装的PHP版本,不能多选,只能选一个,要安装多个需要安装完成后再运行前面的安装命令。已经 阅读全文
posted @ 2019-12-23 14:48 盘思动 阅读(2255) 评论(1) 推荐(0) 编辑
摘要:zb@zb-computer:/usr/local/nginx/conf/vhost$ ps -ef | grep php-fpmroot 10205 2359 0 15:07 ? 00:00:00 php-fpm: master process (/usr/local/php/etc/php-fp 阅读全文
posted @ 2019-12-23 10:53 盘思动 阅读(894) 评论(0) 推荐(0) 编辑
摘要:public function Base64EncodeImage($ImageFile) { // 图片转化base64格式 , 图片需要在本地,有访问权限 , 相对于项目路径 if(file_exists(ImageFile)||isfile(ImageFile)){ imageinfo=getimagesize(ImageFile); $image_data = frea 阅读全文
posted @ 2019-11-29 22:05 盘思动 阅读(401) 评论(0) 推荐(0) 编辑
摘要:<pre>array(16) { [&quot;appid&quot;] =&gt; string(18) &quot;xxxxxxxxxxxxxxxxxxx&quot; [&quot;bank_type&quot;] =&gt; string(3) &quot;CFT&quot; [&quot;c 阅读全文
posted @ 2019-11-14 11:04 盘思动 阅读(384) 评论(0) 推荐(0) 编辑
摘要:date("Y-m-d H:i:s",strtotime("+1 month")) 下个月今天此时 stime=strtotime(20191111);date("YmdH:i:s",strtotime("+1month",stime)) 距离某日期开始,下个月该时间 阅读全文
posted @ 2019-11-13 17:10 盘思动 阅读(84) 评论(0) 推荐(0) 编辑
摘要:在PHP中暂停代码执行一定时间,有两个函数可以实现,一个是sleep(),另一个是usleep(),它们参数都是一个整数值。sleep()是暂停多少秒,usleep()是暂停多少微秒。 注意:usleep()单位是微秒,1秒 = 1000毫秒 ,1毫秒 = 1000微秒,即1微秒等于百万分之一秒。 阅读全文
posted @ 2019-11-13 14:47 盘思动 阅读(436) 评论(0) 推荐(0) 编辑
摘要:array(9) { [0]=> string(16) "CallbackDemo.php" [1]=> string(8) "Demo.php" [2]=> string(9) "README.md" [3]=> string(15) "UnionClient.php" [4]=> string( 阅读全文
posted @ 2019-11-02 11:38 盘思动 阅读(740) 评论(0) 推荐(0) 编辑
摘要:p=http://;p = '/'.preg_quote(p,/)./;echop;/http\:\/\// 阅读全文
posted @ 2019-11-01 20:31 盘思动 阅读(109) 评论(0) 推荐(0) 编辑
摘要:array_slice 分割数组, 效果相当于 substr 类似字符串操作 阅读全文
posted @ 2019-11-01 13:44 盘思动 阅读(129) 评论(0) 推荐(0) 编辑
摘要:<?php class Car { private function __construct() { echo 'object create'; } private static $_object = null; public static function getInstance() { if ( 阅读全文
posted @ 2019-10-31 22:33 盘思动 阅读(343) 评论(0) 推荐(0) 编辑
摘要:function test3($i){ echo i.<br/>;if(i >= 0){ func = __FUNCTION__; // 外面函数名称变了,不用跟着变func(i - 1); } echoi . '<br/>'; } test3(3); 3 2 1 0 -1 -1 0 1 2 3 阅读全文
posted @ 2019-10-31 21:12 盘思动 阅读(137) 评论(0) 推荐(0) 编辑
摘要:Array( [title] => 推荐 [code] => 1) array(3) { [1]=> string(6) "推荐" [3]=> array(2) { // 这里出现很诡异的结果 ["title"]=> string(7) "奇闻2" ["code"]=> int(2) } [4]=> 阅读全文
posted @ 2019-10-31 20:32 盘思动 阅读(187) 评论(0) 推荐(0) 编辑
摘要:User=D(User);User->query('select * from think_user where status=1'); $User->execute('update think_user set status=1 where id=1'); 阅读全文
posted @ 2019-10-22 13:40 盘思动 阅读(1629) 评论(0) 推荐(0) 编辑
摘要:$_SERVER["SERVER_ADDR"] 当前运行脚本的服务器的ip地址 阅读全文
posted @ 2019-10-15 10:30 盘思动 阅读(2479) 评论(0) 推荐(0) 编辑
摘要:<pre>array(8) { [0] =&gt; int(3) [1] =&gt; int(3) [2] =&gt; int(3) [3] =&gt; int(3) [4] =&gt; int(2) [5] =&gt; int(2) [6] =&gt; int(2) [7] =&gt; int(2 阅读全文
posted @ 2019-10-10 17:42 盘思动 阅读(425) 评论(0) 推荐(0) 编辑
摘要:banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana ) Array ( [-2] => pear [0] => pear [1] => pear [2] => pear ) 阅读全文
posted @ 2019-10-10 15:04 盘思动 阅读(577) 评论(0) 推荐(0) 编辑
摘要:sprintf('%.2f',$a) //强大的格式化函数 //结果为字符串 //小数点位数不够,填充0 阅读全文
posted @ 2019-09-29 09:23 盘思动 阅读(476) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页
点击右上角即可分享
微信分享提示