[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.db.adapter = "mysqli"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "*******"
resources.db.params.dbname = "books"
resources.db.isDefaultTableAdapter = true
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
<?php
/* index.php */
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
/* Model Books */
<?php
class Model_Books extends Zend_Db_Table_Abstract{
/* must correspond with the name of the Db Table */
protected $_name = 'books';
}
<?php
/* Kontroler */
class BooksController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
}
public function listAction()
{
$booksTBL = new Model_Books();
}
}
Jak w temacie. Gdy probuje wejsc na skeleton.dev/books/list wywala
Fatal error: Class 'Model_Books' not found in /home/fi3rce/public_html/zfskeleton/application/controllers/BooksController.php on line 19
Szukam i szukam i bledu nie widze, pewnie jakas glupota...
Chyba, ze jest roznica w laczeniu sie z baza miedzy 1.8, a 1.12?