因为项目中使用swoole开发,一直使用win10 ubuntu子系统开发,随着代码量的增加,每次启动越来越慢。swoole官方提供了一个windows版swoole,启动速度特别快。但是由于其使用cgwin编译,所以无法正常使用composer,每次都需要切换php的环境变量。于是就想能不能让composer 识别我原来的php版本。打开composer的根文件试试真的可以。
composer文件: D:\Program Files\composer\composer
(1).原代码:
#!/bin/sh
dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)
if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi
php "${dir}/composer.phar" "$@"(2).修改后代码
#!/bin/sh
dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)
if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi
D:/phpStudy/PHPTutorial/php/php-7.0.12-nts/php "${dir}/composer.phar" "$@"只是将php的地址修改下即可,让composer每次加载我的phpstudy的php版本
public static string GetMD5(string str) { //创建MD5对象 MD5 md5 = MD5.C...
private const string fantizi = "高久峰是個程序員"; private const string jiantizi = "高久峰是个程序员...
1.文件redis-2.6.14.tar.gz的上传 /home/john/创建rdtar文件夹 上传redis-2.6.14.tar.gz至rdtar文件夹 2.解压文件 cd /home/john/rdtar tar &n...
navicat for mysql 11.1.13 企业破解版.绿色软件免安装,请直接打开安装说明.一定要看说明.下载地址: http://pan.baidu.com/s/1dFINxNN下载链接失效,直接点击上方QQ呼叫...
1.设置key的value set name gao2.获取key的value get name3.删除key del key1 key2 ... Keyn4.修...
1.set key value [ex 秒数] / [px 毫秒数] [nx] /[xx]如: set a 1 ex 10 , 10秒有效Set a 1 px 9000 , 9秒有效注: 如果ex,px同时写,以后面的有效期为准如 set a 1 ex 100 px 9000...