Sunday, September 20, 2009

Define Constants in Codeigniter.




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

All rights are reserved. Nobleatom.com
Software Development Services.
Contact me: khubabmazhar596@hotmail.com

Web Design Increase Page Rank Internet blogs DigNow.net web directory1Abc DirectorySeo friendly web directory