Rich Ajax Application Framework

Loading A Custom Configuration File


Quick Links


Download Raxan 1.0 Beta 3
See What's New

There might be times when you want to load a custom config file for your application, in order to easily maintain your database login information or override default settings.

To do this, you only need to call the RichAPI::loadConfig() method as shown in the example below.


<?php

	require_once 'raxan/pdi/gateway.php';

	RichAPI::loadConfig('include/myconfig.php');

	// ...your code here...

?>

Raxan PDI includes a sample configuration file called gateway.config.sample.php, that's located inside the raxan/pdi folder.

To quickly get started with your custom config file, simply copy and rename gateway.config.sample.php then use your favorite text editor to modify the default settings

In addition to loading your a config file, you can also make on the fly configuration changes by using the RichAPI::config($key, $value) method:



<?php

	require_once 'raxan/pdi/gateway.php';

	RichAPI::config('views.path','html/views/');


?>

For online discussions check out the Raxan Community or post a comment below.


Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.