I want to initialize constants and get across application in cakephp. Plz help me.How to use?
+1
A:
I'm not sure I understand your question correctly, but one place to define your application-wide constants is app/config/bootstrap.php.
dhofstet
2009-07-16 09:35:05
+2
A:
You can use the Configure Class
You can use Configure to read/write values available across the application. As dhofstet mentioned, a good place to do this is in app/config/bootstrap.php
Mariano Iglesias wrote a very good article about this.
Darren Newton
2009-07-16 12:08:25
A:
You can define your constants in app/config/bootstrap.php
or in app/config/core.php
(I believe the former is preferred, but either one works). The syntax for defining a constant is:
define('MY_CONSTANT','my value');
Good luck!
inkedmn
2009-07-16 15:38:43