Welcome Guest, Not a member yet? Register   Sign In
edit config array
#1

[eluser]ranjitbd[/eluser]
Code:
//a file ftp.php,i want to add this file in $config array.
//the file is located at config/ftp.php.

// so what will be the code in the application/config/config.php
//please write the code line not suggest to go user_guide..i already rad that.
#2

[eluser]jedd[/eluser]
Here's the thing.

I have the greatest respect for anyone learning a second language - I've tried, and I'm hopeless at it. Sure, it'd have been easier if I'd learned at a better age (something under 12 from memory) .. but nonetheless, I'm consequently willing to cut a NESBy a lot of slack.

But, really, I reckon if you can do these things, you'll find people are a lot more willing and able to help.

o Put code tags around your code partials .. and only around your code partials. You can see how to do this properly by looking at everyone else's posts.
o Put a question mark ( '?' ) in there somewhere - it's how, in English, we denote a question. Otherwise it just looks like a bunch of statements.
o If you're confused about what's happening with some code, a) show the code, b) describe what you think should happen, and c) describe what does happen.
#3

[eluser]n0xie[/eluser]
[quote author="ranjitbd" date="1251889933"]
so what will be the code in the application/config/config.php
please write the code line not suggest to go user_guide..i already rad that.
[/quote]
Well if you actually HAD looked at the user_guide you would have found this page: the config class, which explains in rather full detail how one would go about solving your 'problem'. Before saying you 'rad' it you might actually want to 'read' it.

Anyway since we usually are quite helpful on the forum, let me 'write the code line'.

config/ftp.php
Code:
$config['ftp_host']    = 'ftp.debian.nl';
$config['ftp_port']    = 21;

controllers/somecontroller.php
Code:
$this->config->load('ftp');
echo $this->config->item('ftp_host');
echo $this->config->item('ftp_port');




Theme © iAndrew 2016 - Forum software by © MyBB