
| Defining contants in codeigniter is easy but according to my point of view, I don't like the procedure. But I have to provide solution to those who want to use constants. |
SOLUTION
You can define the constants in the index.php present in the root directory of codeigniter. You can also include constant files in the index file.
Codeigniter has define some in its core constants in the index file.
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');

No comments:
Post a Comment