tags:

views:

63

answers:

3

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
+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
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