0

これは Zend での最初のプログラムです。zf create project abc でプロジェクトを作成しました。プログラムを実行すると、次のエラーが表示されます。致命的なエラー: Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching "frontController" not found' in /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract. php:694 スタック トレース: #0 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(626): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('frontController') #1 /usr/share/ php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(586): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #2 /usr/share/php/libzend-framework-php/Zend/Application.php(355) ):

application.ini ファイルの内容は

[production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    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

[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

返事を待っています

4

2 に答える 2

0

コントローラーとビューのスクリプトを作成しましたか?? 最初に application/controller で index controller を検索します。コントローラーを作成していないように見えます。作成後にプログラムを実行しているだけです。

最初に zend のスケルトン アプリケーションを見て、それがどのように機能するかを理解してください。

ここにリンクがあります、

http://framework.zend.com/manual/1.12/en/learning.quickstart.html

合計コードと説明を含む別の例、

http://akrabat.com/zend-framework-tutorial/ ....

それが役に立てば幸い..

于 2013-09-03T11:57:14.403 に答える
0

どうもありがとう!あなたのヒント(app.ini内)が私の問題を解決しました。

これが私のコードです:

;application/configs/application.ini 
[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.frontController.defaultControllerName = "view"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view[]="" 

[staging : production]
;resources.view.encoding = [] ="utf-8"
[testing : production]
phpSettings.display_startup_errors = 1

phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
于 2015-03-17T16:36:28.977 に答える