I used the ZF box to integrate the smarty. An error occurred. please read it. I used the ZF box to integrate the smarty. An error occurred. please take a look. it seems to be a path error. I first created application/views/templates and application/views/template respectively. I used the ZF box to integrate smarty, and an error occurred. please take a look.
I used the ZF box to integrate the smarty. An error occurred. please take a look. it seems to be a path error.
I created the application/views/templates and application/views/templates_c/cache_c folders respectively.
And then in the form of plug-ins. Load Smarty in index. php.
/*
* Date: 2009.8.16
* Author: DaGui
* Email: daguizhang@gmail.com
* QQ: 308713166
*/
Error_reporting (E_ALL | E_STRICT );
Date_default_timezone_set ('Asia/Shanghai ');
Define ('web _ root', 'http: // 192.168.12.190: 81/vote /');
Set_include_path ('.'. PATH_SEPARATOR. './library'. PATH_SEPARATOR. './application/models/'. PATH_SEPARATOR. get_include_path ());
Require_once 'zend/Loader. php ';
Zend_Loader: registerAutoload (); // sets Zend Framework to automatically load class files
$ Registry = Zend_Registry: getInstance ();
// Create a verification object
$ Auth = Zend_Auth: getInstance ();
// Create an access permission object
$ Acl = new Common_Plugin_MyAcl ();
// Set the controller
$ FrontController = Zend_Controller_Front: getInstance ();
$ FrontController-> setBaseUrl ('/vote') // set the basic path
-> SetParam ('noviewrenderer', true)
-> RegisterPlugin (new Common_Plugin_MyAuth ($ auth, $ acl ))
-> RegisterPlugin (new Zend_Controller_Plugin_ErrorHandler ())
-> SetControllerDirectory ('./application/controllers ')
-> ThrowExceptions (true)
-> Dispatch ();
?>
My code on the controller layer is as follows:
Class IndexController extends Zend_Controller_Action
{
Protected $ views;/* template object */
Protected $ data;/* object for passing Template variables */
Function init ()
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.