Ok, on my side using Zend_Apoplication seems was bugless based on your comments, so now things are working fine.
However, i didn't tested some of advanced functionalities, as module bootstrapping, aso.
-- Best regards, Cristian Bichis www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
-- Cristian Bichis <contact@zftutorials.com> wrote (on Sunday, 01 March 2009, 09:05 PM +0200):Matthew Weier O'Phinney wrote: Regarding the settings in questions 1, 3, and 4, these could be in a config file as well, and you could simply pass the path to a config file when instantiating Zend_Application. As an example, consider this: $app = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/site.ini' ); where APPLICATION_PATH . '/configs/site.ini' reads as follows: [production] phpSettings.display_errors = false phpSettings.error_reporting = 771 autoloaderNamespaces.imagis = "Imagis_" autoloaderNamespaces.phly = "Phly_" includePaths.cwd = "." includePaths.lib = APPLICATION_PATH "/../library" [development : production] phpSettings.display_errors = true phpSettings.error_reporting = 8191 As you can see, this makes the application code simpler, and makes it easier to switch settings per environment (which is also one of the goals of Zend_Application). Thanks for replies, I have one more question: It is possible to set bootstrap file from config.ini ? //index.php $application = new Zend_Application(APPLICATION_ENVIRONMENT, APPLICATION_PATH . '/config/config.ini' ); //config.ini bootstrap = APPLICATION_PATH.'/Bootstrap.php'Try just this: bootstrap = APPLICATION_PATH "/Bootstrap.php" note the lack of "." and the double quotes. Also, ensure that the APPLICATION_PATH constant is set prior to instantiating Zend_Application.error: Warning: require_once(APPLICATION_PATH.'/Bootstrap.php') [function.require-once ]: failed to open stream: No such file or directory in D:\_Work\hostexpert2\ library\dasprid\Zend\Application.php on line 228 In am encountering error from above when trying to set bootstrap through config file.
没有评论:
发表评论