我創建了一個shell腳本如下運行CakePHP的Shell腳本
<?php
class EmailShell extends AppShell
{
public function main()
{
$this->out('Hello world.');
}
}
,當我在命令行中定位到控制檯文件夾並鍵入蛋糕電子郵件我碰到下面的錯誤。
Error: Shell class EmailShell could not be found.
#0 C:\wamp\www\gitgrow\lib\Cake\Console\ShellDispatcher.php(167): ShellDispatche
r->_getShell('email')
#1 C:\wamp\www\gitgrow\lib\Cake\Console\ShellDispatcher.php(69): ShellDispatcher
->dispatch()
#2 C:\wamp\www\gitgrow\app\Console\cake.php(33): ShellDispatcher::run(Array)
#3 {main}
查看更多:http://stackoverflow.com/questions/10671634/cakephp-shell-shell-class-helloshell-could-not-be-found/26845978#26845978 – 2014-11-10 14:27:13