随笔分类 -  php环境安装

环境安装
摘要://下载 --安装 --复制扩展文件到对应目录 wget https://pecl.php.net/get/apcu-5.1.7.tgz tar -zvcf pcu-5.1.7.tgz cd 到解压目录 // 声明:phpize 和 php-config 一般在一个目录:参考 /usr/local/ 阅读全文
posted @ 2020-03-20 16:10 千载白云 阅读(1147) 评论(0) 推荐(0)
摘要:php 相关 wget https://www.php.net/distributions/php-7.2.16.tar.gz //你可以官网获取最新的包 tar解压 //一般目录 /usr/src yum -y install gcc gcc-c++ libxml2-devel m4 autoco 阅读全文
posted @ 2020-03-09 22:28 千载白云 阅读(910) 评论(0) 推荐(1)
摘要:2分查找 快速排序 选择排序 归并排序 1,二分查找做多需要log2n步;--对数是幂运算的逆运算。 <?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 'on'); function binary_search($a 阅读全文
posted @ 2020-01-14 16:48 千载白云 阅读(268) 评论(0) 推荐(0)
摘要:求字符串最大子串长度<?php class zif { public function sz($str) { $strsz = str_split($str); $zi = []; $len = []; foreach ($strsz as $val) { if (in_array($val, $z 阅读全文
posted @ 2019-12-08 16:08 千载白云 阅读(606) 评论(0) 推荐(0)
摘要:$ composer config -g repo.packagist composer https://packagist.laravel-china.org 阿里云 Composer 全量镜像发布了,实时同步,秒级更新 https://mirrors.aliyun.com/composer/in 阅读全文
posted @ 2019-10-23 10:26 千载白云 阅读(501) 评论(0) 推荐(0)
摘要:https://www.jianshu.com/p/d080d06557be 更改环境变量来修改默认的php版本 新建一个.bas_profile文件并编辑 vim ~/.bash_profile 然后在里面输入自己想要的php版本 export PATH=/Applications/MAMP/bi 阅读全文
posted @ 2019-08-04 16:52 千载白云 阅读(4540) 评论(0) 推荐(0)
摘要:composer config -g repo.packagist composer https://packagist.laravel-china.org 阅读全文
posted @ 2019-05-13 19:53 千载白云 阅读(254) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/xp796/p/6441700.html 阅读全文
posted @ 2019-05-09 10:18 千载白云 阅读(579) 评论(0) 推荐(0)
摘要:https://learnku.com/articles/17377 阅读全文
posted @ 2019-05-08 11:44 千载白云 阅读(89) 评论(0) 推荐(0)
摘要:参考 https://www.cnblogs.com/yulongcode/p/10585229.html https://blog.csdn.net/qq_41921511/article/details/80816845 阅读全文
posted @ 2019-05-07 18:15 千载白云 阅读(121) 评论(0) 推荐(0)
摘要:1、一群猴子排成一圈,按1,2,…,n依次编号。然后从第1只开始数,数到第m只,把它踢出圈,从它后面再开始数,再数到第m只,在把它踢出去…,如此不停的进行下去,直到最后只剩下一只猴子为止,那只猴子就叫做大王。要求编程模拟此过程,输入m、n, 输出最后那个大王的编号。 function king($n 阅读全文
posted @ 2019-04-09 15:28 千载白云 阅读(278) 评论(0) 推荐(0)
摘要:分三步 1:引入类; 2:新建Jpush类; 3:修改源码(PHP5.3.3环境) 阅读全文
posted @ 2018-10-29 11:54 千载白云 阅读(300) 评论(0) 推荐(0)
摘要:<pre>Array( [0] => Array ( [stockCode] => 000001 [stockName] => 平安银行 [nowPrice] => 10.37 [RateRiseFall] => 2.57% ) [1] => Array ( [stockCode] => 00000 阅读全文
posted @ 2018-10-16 17:18 千载白云 阅读(413) 评论(0) 推荐(0)
摘要:$str="你好<我>(爱)[北京]{天安门}"; $str="你好<我>(爱)[北京]{天安门}"; echo f1($str); //返回你好 echo f1($str); //返回你好 echo f2($str); //返回我 echo f2($str); //返回我 echo f3($str 阅读全文
posted @ 2018-09-14 16:15 千载白云 阅读(97) 评论(0) 推荐(0)
摘要:链接 https://blog.csdn.net/liuxin_0725/article/details/81514961 问题 id int型 数字过长,json_decode的时候已经转成科学计数了 通过格式化后 数字已经变了 问题 id int型 数字过长,json_decode的时候已经转成 阅读全文
posted @ 2018-09-14 16:07 千载白云 阅读(1135) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/admin_admin/article/details/51769805 1、扩展控制器 阅读全文
posted @ 2018-09-06 10:09 千载白云 阅读(640) 评论(0) 推荐(0)
摘要:系统自动在Application文件夹下生成的config.php文件,采用key-value关联数组的形式来存放配置项和值.为了使结构更清晰,手动新建另外一个配置文件myconfig.php,所采用的形式亦为关联数组, 阅读全文
posted @ 2018-09-05 18:25 千载白云 阅读(1081) 评论(0) 推荐(0)
摘要://自定义ascii排序function ASCII($params = array()){ if(!empty($params)){ $p = ksort($params); if($p){ $str = ''; foreach ($params as $k=>$val){ $str .= $k 阅读全文
posted @ 2018-09-03 10:24 千载白云 阅读(12094) 评论(0) 推荐(0)
摘要:$num = 12.233; //第一种:利用round()对浮点数进行四舍五入;--对整数不起作用 echo round($num,2); //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num); echo $format_num; //第三种:利用千位分组来格式化数字的函... 阅读全文
posted @ 2018-08-16 12:28 千载白云 阅读(370) 评论(0) 推荐(0)
摘要:最普遍的答案 1. GET使用URL或Cookie传参。而POST将数据放在BODY中。 2. GET的URL会有长度上的限制,则POST的数据则可以非常大。 3. POST比GET安全,因为数据在地址栏上不可见。 但是很不幸,这些区别全是错误的,更不幸的是,这个答案还是Google搜索的头版头条, 阅读全文
posted @ 2018-08-14 18:52 千载白云 阅读(139) 评论(0) 推荐(0)