Unfortunately, in IIS I never find how to define an environment variable
as in apache (if someone know how to do that, I am very interested). So,
for the moment I instead use the name of the computer (variable
COMPUTERNAME), so the modification to rely on a ini variable in the
default error.phtml instead of an environment variable is great.
Thanks.
Ithier
Ralph Schindler a écrit :
> This is being changed in 1.10.
>
> See:
>
> http://framework.zend.com/svn/framework/standard/incubator/library/Zend/Tool/Project/Context/Zf/ControllerFile.php
>
>
> Currently this work is in the incubator, although I am rolling out
> alpha packages at major milestones in the pear package format.
>
> Hector Virgen wrote:
>> The default error.phtml created by zf.sh tests the APPLICATION_ENV
>> constant to determine if exception information should be displayed.
>> If it's set to "development", then exception information is
>> displayed. Is there a better way for it to determine this without
>> using the constant?
>>
>> --
>> Hector
>>
>>
>> On Wed, Oct 28, 2009 at 2:26 PM, Brenton Alker <brenton@tekerson.com
>> <mailto:brenton@tekerson.com>> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> huajun qi wrote:
>> > I know zend defines a APPLICATION_ENV variable in the index.php
>> file,
>> > but we don't see it is used explicitly. Is it used in zend source
>> code?
>>
>> It's not used internally, no. So, you could rename it (or not set
>> it)
>> without problem. The only way it is used is when you instantiate
>> Zend_Application you tell it which section of the config
>> (application.ini by default) you want to load.
>>
>> > Does it have some usage to help develop?
>>
>> You often have different sections of the config file
>> (application.ini)
>> for each environment. By default, one for
>> testing/staging/production.
>> Usually, the majority of the configuration is in production and the
>> others inherit from that.
>>
>> You can then override values in the other sections. This can be
>> used to
>> do things like override the database configuration, to use SQLite
>> for
>> testing, or a separate MySQL instance for staging.
>>
>> Hope that helps.
>>
>> - --
>>
>> Brenton Alker
>> PHP Developer - Brisbane, Australia
>>
>> http://blog.tekerson.com/
>> http://twitter.com/tekerson
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkrotwAACgkQ7bkAtAithuv4UwCfYTPeVj+McP94lz4OEm0NN48x
>> ojcAn3IE3ofwyL2s8Q4quvR+3XBe+UEC
>> =AGUq
>> -----END PGP SIGNATURE-----
>>
>>
>
没有评论:
发表评论