[eluser]mohfeza code ignitor[/eluser]
I read the tutorial that "CodeIgniter automatically loads the primary config file (application/config/config.php), so you will only need to load a config file if you have created your own."
the below is my code-
My code:
<form id="search_form" method="post" action="<?php echo $base_url;?>index.php/amazon/search">
where $config['base_url']="http://mohfezalearningtools.com/codeIgnitor/"; in application/config/config.php
The Error I got:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: base_url
Filename: views/index.php
Line Number: 51
I got the above error message, but when i loaded config.php file manually, didn't get any error and working fine.
$this->config->load('config');
$base_url=$this->config->item('base_url');
My question is why config.php file needs to be loaded even though i have not add any additional stuff to it. Please reply me ASAP.