homer09001 Posted April 18, 2009 Report Share Posted April 18, 2009 im in the process of writing a module and i need to read vales from the config file, how do i go about getting them? here is my module so far: <? class FLS_SendFlights extends CodonModule { function Controller() { $dbuser = Config::Get('DBASE_USER'); $dbpass = Config::Get('DBASE_PASS'); $dbname = Config::Get('DBASE_NAME'); $server = Config::Get('DBASE_SERVER'); echo "$dbuser<br>$dbpass<br>$dbname<br>$server"; } } ?> Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 18, 2009 Administrators Report Share Posted April 18, 2009 Yes you use Config::Get() No need to read DB values, the database is automatically connected Any variables set using Config::Set(name, value); can be read as Config::Get(name) You can also read http://codon.nsslive.net Quote Link to comment Share on other sites More sharing options...
homer09001 Posted April 19, 2009 Author Report Share Posted April 19, 2009 so in theory if i load that module now it will display the values of those config variables? problem being it doesn't? Quote Link to comment Share on other sites More sharing options...
homer09001 Posted April 19, 2009 Author Report Share Posted April 19, 2009 scrap that last message, i got it working: http://www.dvds.dth-scripts.com/trunk/index.php/FLS_SendFlights Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.