打开CMD 假设我们有一个 test控制器 下面有一个 index 方法 切换到当前控制器目录中 执行 php yii test/index 即可 转载于:https://www.cnblogs.com/wyj168/p/8650077.html