因为项目中使用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版本
1.全局用户信息设置 git config --global user.name gaojiufeng git config --global user.email 392223903...
1.关机Process.Start("shutdown", "-s -t 0"); 2. 注销 Proc...
public static string GetMD5(string str) { //创建MD5对象 MD5 md5 = MD5.C...
private const string fantizi = "高久峰是個程序員"; private const string jiantizi = "高久峰是个程序员...
方案1.IE浏览器"无法显示此页"的解决办法(1).按下Win+R键打开运行,输入netsh winsock reset,回车;(2).重启即可. 方案2.IE浏览器"无法显示此页"的解决办法 (1).设置-连接-局域网设置-自动检测设置开...
首先网页全部是纯静态的文件,本地测试正常访问,服务器端无法加载CSS,并且无法查看CSS文件的内容。 解决方案:关闭网站的压缩->>静态压缩和动态压缩...