2011-02-23 5 views

答えて

1

別に公式ZF quick startから、私はTutorial: Getting Started with Zend Framework 1.10を見てすることができお勧めできます。無料の本:Zend Framework Book: Surviving The Deep EndZendCastもチェックできます。

編集。下のコメント欄でOPの要求によって、私はbootstrap.phpのいくつかの例とiniファイルを貼り付けます。bootstrap.phpの

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { 

    // set a doctype for the Zend_View  
    protected function _initDoctype() { 
     $view = $this->bootstrap('view')->getResource('view'); 
     $view->doctype('XHTML1_STRICT'); 
    } 

    // add path to my view helpers 
    protected function _initHelperPath() { 
     $view = $this->bootstrap('view')->getResource('view'); 
     $view->setHelperPath(APPLICATION_PATH . '/views/helpers', 'My_View_Helper'); 
    } 

    // read appkey.ini and save it to registry for later use 
    protected function _initAppKeysToRegistry() { 

     $appkeys = new Zend_Config_Ini(APPLICATION_PATH . '/configs/appkeys.ini'); 
     Zend_Registry::set('keys', $appkeys); 
    } 

} 

appkeys.ini

; facebook and twitter app keys obtained after registering your app 
; with these two websites. 

facebook.appid = YOUR_FACEBOOK_APPID 
facebook.secret = YOUR_FACEBOOK_SECRET 
facebook.redirecturi = http://url.of.your.app/ 
facebook.scope = 'email' 

twitter.appid = YOUR_TWITTER_APPID 
twitter.secret = YOUR_TWITTER_SECRET 
twitter.redirecturi = http://url.of.your.app/ 
+0

私は、ブートストラップやiniファイルなしでloginformというサンプルを作成したことを学びました。なぜ、これらのファイルが必要なのか、私に一度の例を教えてください。 @kiran。 – kiran

+0

Bootsrap.phpとiniファイルを持っていないものはどれですか? – Marcin

+0

はい、私たちは持っていますが、そのファイルを使用せずにそのファイルを使用しなければならない理由は、私たちのexmapleが実行されている理由です。 – kiran

関連する問題