Run in CakePHP v2.6.4: ./cake hello, error: error shell class helloshell could not be found.
1. Reference URL:https://book.cakephp.org/2/en/console-and-shells.html, create a simple hello world shell. In the application’s console/command directory, create helloshell.php.
out('Hello world.');
}
}
2. Enter the directory: e:\wwwroot\creditshop\app\console, execute: ./cake hello, report an error: error shell class helloshell could not be found. as shown in Figure 1
PS E:\wwwroot\creditshop\app\Console> ./cake hello
Error: Shell class HelloShell could not be found.
#0 E:\wwwroot\creditshop\lib\Cake\Console\ShellDispatcher.php(200): ShellDispatcher->_getShell('hello')
#1 E:\wwwroot\creditshop\lib\Cake\Console\ShellDispatcher.php(66): ShellDispatcher->dispatch()
#2 E:\wwwroot\creditshop\app\Console\cake.php(47): ShellDispatcher::run(Array)
#3 {main}
3. Reference URL:https://stackoverflow.com/questions/10671634/cakephp-shell-shell-class-helloshell-could-not-be-found, as shown in Figure 2
4. Enter the directory: e:\wwwroot\creditshop\app, execute: console/cake hello, no error is reported. as shown in Figure 3
PS E:\wwwroot\creditshop\app> Console/cake hello
Welcome to CakePHP v2.6.4 Console
---------------------------------------------------------------
App : app
Path: E:\wwwroot\creditshop\app\
---------------------------------------------------------------
Hello world.


