Welcome Guest, Not a member yet? Register   Sign In
receive data from autoloading file
#1

[eluser]mohfeza code ignitor[/eluser]
please let me know ASAP how to receive data from autoloading file?

I created a file in application/config/ folder named amazonconfig.php
and autoloaded it in application/config/autoload.php as

$autoload['config']=array('amazonconfig');

amazonconfig contains $config['aid']='php9webcom9';

I tried to get data using echo $aid; but not working.
Please let me know if you have any solution.
#2

[eluser]wiredesignz[/eluser]
Read the user guide first http://ellislab.com/codeigniter/user-gui...onfig.html

If you still get stuck post back.

Good luck and Welcome to CI forums
#3

[eluser]mohfeza code ignitor[/eluser]
I read that tutorial earlier. I build a custom config file named 'amazonconfig' and add into autoload.php as $autoload['config'] =array('amazonconfig');. Tutorial said- I don't need to load 'amazonconfig' file manually. my question is why i am not getting data from amazonconfig.php if i do $var. That means autoloading is not working. Please give me solution
#4

[eluser]Derek Allard[/eluser]
It could also mean there's an error in your files. Could you post the most basic example possible to illustrate what's happening please? The most basic example would look like amazonconfig having only
Code:
<?php
$config['testconfig'] = 'this is a test config';
?>

And then in your controller you'd have
Code:
echo $this->config->item('testconfig');

Please let us know ASAP what this file looks like.




Theme © iAndrew 2016 - Forum software by © MyBB