Đang chuẩn bị liên kết để tải về tài liệu:
Easy PHP Websites with the Zend Framework (phần 4)

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo sách 'easy php websites with the zend framework (phần 4)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | CHAPTER 5 INTRODUCING THE ZEND FRAMEWORK 131 Listing 5-11. Registration E-mail in Production Mode Dear Jason Welcome to the GameNomad community To confirm your e-mail address click on the following URL http www.gamenomad.com gamers verify key zs7lquz958qknj1hqq70gcg89egqsdf1 Questions Comments Contact us at support@gamenomad.com Thank you The GameNomad Team We can create these e-mail variations by passing configuration variables into a template Listing 5-12 . Listing 5-12. The Registration E-mail Template Dear firstName Welcome to the GameNomad community To confirm your e-mail address click on the following URL this- config- website- url gamers verify key registrationKey Questions Comments Contact us at this- config- email- support Thank you The GameNomad Team The Zend Framework will be able to identify which set of configuration variables should be passed based on the value of APPLICATION_ENVIRONMENT defined in the bootstrap.php file defined APPLICATION_ENVIRONMENT or define APPLICATION_ENVIRONMENT development Also in the bootstrap.php file you ll need to execute two other commands config new Zend_Config_Ini home webadmin html application config.ini APPLICATION_ENVIRONMENT Zend_Registry set config config The first line identifies the location of the config.ini file and identifies the defined application environment. The second line uses the Zend_Registry component to register the config variable within the website s registry meaning it can later be retrieved using the following command this- config Zend_Registry get config You ll need to ensure this command executes prior to retrieving the configuration variables from the Download at Boykma.Com 132 CHAPTER 5 INTRODUCING THE ZEND FRAMEWORK config.ini file. Of course the easiest way is to simply call the command directly prior to referencing one or more configuration variables however as you ll likely need to do so for multiple actions within a controller later in this chapter I ll show you an easy way to .