Following the user manual instructions found here: http://ellislab.com/codeigniter/user-guide/general/cli.html I can not run the test script through the command line.
My controller located in / var / www / mysite / application / controller /
class Tools extends CI_Controller {
public function message($to = 'World')
{
echo "Hello {$to}!".PHP_EOL;
}
}
In my browser, I can access
http://mysite/tools/message/ben
And the function correctly displays "Hello ben"
From the terminal, I should be able to run:
$ php index.php post "Ben"
My terminal should print: "Hello Ben"
However, I get the following error:
PHP Fatal error: class 'CI_Controller' not found in /var/www/mysite/system/core/CodeIgniter.php on line 233
; ubuntu LAMP. Codeigniter , CI-
PHP /usr/bin/php < - CI usr/bin/php, PHP, , , PHP CI script.
, , .
.