Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Zend_Tool_Project also comes with the ability to be able to create actions (within existing Action Controllers) and create the corresponding view scripts as well.
$db = Zend_Db::factory($config->db->adapter, $config->db->params->toArray());
$db->query('SET NAMES utf8');
public function query($sql, $bind = array(),$pre=false)
{
if(!$this->preExecute && !$pre)
{
$this->query('SET NAMES utf8',array(),true);
$this->query("SET time_zone='+04:00'",array(),true);
$this->preExecute = true;
}
return parent::query($sql,$bind);
}
C:\>zf version
An error has occured:
Action 'version' is not a valid action.
- <?php
-
- <?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'));
-
- /** 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();
- $application->run();
* This source code was highlighted with Source Code Highlighter.
- <?php
- <?php
-
- require_once 'Zend/Controller/Action.php';
-
- class IndexController extends Zend_Controller_Action
- {
- public function init()
- {
- /* Initialize action controller here */
- }
-
- public function indexAction()
- {
- // action body
- }
- }
* This source code was highlighted with Source Code Highlighter.[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
* This source code was highlighted with Source Code Highlighter.
1.8 Preview Release