Welcome Guest, Not a member yet? Register   Sign In
Constant
#1

[eluser]Shella[/eluser]
Hi guys,
today i'm looking for suggestion!

Actually I'm working on a site that need to identify some constant.
I chased around with uncle Google but posts are old and different people said different solutions.

The question is quite simple. Which is the best way to use connstant variables with codeigniter (2.1.2)

Personally I set up constant like this is config/config.php

Code:
define('absolute_path', "/htdocs/public/www/somefolder");

and I get the valur back in a controller file with:
Code:
$data['absolute_path'] = absolute_path;
$this->load->view('destination_viewfile', $data); // to pass the value...

It just work but seem to me such tricky and remind me a workaround more then a code stuff...

Your suggestions are veeeery appreciated.

Thanks!


Messages In This Thread
Constant - by El Forum - 08-13-2012, 07:00 AM
Constant - by El Forum - 08-13-2012, 08:02 AM
Constant - by El Forum - 08-13-2012, 02:19 PM
Constant - by El Forum - 08-16-2012, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB