**Edit2: Core.php was not found because Bootstrap.php needed Core.php included require_once 'C:\wamp\www\PhpProject1\application\Core\Core.php'; Solved my Problem **
I am using zendframework and i created a new folder with file Core/Core.php for my functions that i will use in my controllers and elsewhere. But when i try to test a function in my Core.php nothing will show up. I think i am calling the core.php incorrectly but im not sure what the error is.
application/controllers/
IndexController.php
class IndexController extends Zend_Controller_Action
{
public function init()
{
$this->tournamentAction();
}
public function indexAction(){
}
public function tournamentAction()
{
$bleh = new Core();
$this->view->ha = $bleh->yo();
$this->renderScript('tournament/index.phtml');
}
}
application/Core/
Core.php
class Core{
public function init(){
}
public function indexAction(){
}
public function yo(){
$text = 'This is my function Yo';
return $text;
}
application/views/scripts/tournament/ index.phtml
$this->ha;
echo "hello";
Edit: Error reporting is nice ha! This is the error i get.
! ) Fatal error: Class 'Core' not found in C:\wamp\www\PhpProject1\application\controllers\IndexController.php on line 19
Call Stack
# Time Memory Function Location
1 0.0006 678944 {main}( ) ..\index.php:0
2 0.0275 3090632 Zend_Application->run( ) ..\index.php:26
3 0.0275 3090632 Zend_Application_Bootstrap_Bootstrap->run( ) ..\Application.php:366
4 0.0275 3090728 Zend_Controller_Front->dispatch( ) ..\Bootstrap.php:97
5 0.0446 4801056 Zend_Controller_Dispatcher_Standard->dispatch( ) ..\Front.php:954
6 0.0456 4823424 Zend_Controller_Action->__construct( ) ..\Standard.php:268
7 0.0547 5211576 IndexController->init( ) ..\Action.php:133
8 0.0547 5211576 IndexController->tournamentAction( ) ..\IndexController.php:8
echoorprintthe$this->ha.echo $this->ha; die;?