PHP 之命令行模式
1. 所有可用命令
➜ which php |
➜ which php |
相关资源
下面是节选自官方对 Vagrant 的说明:
WHY VAGRANT?
Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.
To achieve its magic, Vagrant stands on the
oulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, or any other provider. Then, industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure software on the machine.
其实,说白了 Vagrant 就是一个普普通通的装了 Linux 的 VirtualBox 虚拟机,配以 Vagrant 团队为之开发的一系列套件,辅助完成诸如安装初始化、文件同步、ssh、部署环境升级、功能插件安装等等一些列问题的开发环境部署套件。
参见知乎话题:Vagrant 和 Docker的使用场景和区别?
解决的痛点:
版本:v5.1.x LTS
v6.0 稳定版已经发布,详见官网:ThinkPHP 6.0
这里以单入口为例解析 ThinkPHP 从接收前端请求到返回数据的整个执行流程,分为如下图的几个步骤:
其中入口文件位置:public/index.php
说明:
jdk 在 macOS 下的安装路径为
/Library/Java/JavaVirtualMachines/
;
/usr/libexec/java_home
是 macOS 下提供的工具,类似一个简单的 java 版本管理工具,可使用-h
参数查看使用帮助。