【发布时间】:2017-05-12 15:21:34
【问题描述】:
我对 cakePHP 完全陌生,这是我第一次尝试创建 shell。 下面是我做 bin\cake 时的输出
欢迎使用 CakePHP v3.4.6 控制台
应用程序:src 路径:C:\Users\ps23\bookmarker\src\
PHP : 7.0.10
当前路径:
- 应用程序:源代码
- 根目录:C:\Users\ps23\bookmarker
- 核心:C:\Users\ps23\bookmarker\vendor\cakephp\cakephp
执行命令后:C:\Users\ps23\bookmarker>bin\cake hello。我得到以下输出:
class HelloShell extends Shell
{
public function main()
{
$this->out('Hello World.');
}
}
namespace src\Shell;
use Cake\Console\Shell;
class HelloShell extends Shell
{
public function main()
{
$this->out('Hello World.');
}
}
异常:找不到“Hello”的 Shell 类。在 [C:\Users\ps23\bookmarker\vendor\cakephp\cakephp\src\Console\ShellDispatcher.php,第 327 行]
我尝试使用以下帖子解决此问题:Cakephp shell :Shell class HelloShell could not be found 但无法解决。
感谢任何帮助。
【问题讨论】:
-
能否用 HelloShell.php 文件的完整内容更新您的问题?