php - Fatal error: Call to undefined function site_url() -
i using codeigniter framework php. have created view named "login.php". once i
created view, loaded view inside of function named "index" located
inside class named "cci" extends controller keep receiving error: fatal
error: call undefined function site_url() in c:\wamp\www\finalp_cci_clone\system
\application\views\login.php on line 12. don't understand issue having because the
welcome page loads fine , second function inside of "cci" class loads fine well.
here of code:
controller files:
function cci() { parent::controller(); } function index() { $this->load->view('login'); } function test() { echo "testing data"; }
}
/* end of file login.php / / location: ./system/application/controllers/cci.php */
class welcome extends controller {
function welcome() { parent::controller(); } function index() { $this->load->view('welcome_message'); } function test() { echo "testing data"; }
}
/* end of file welcome.php / / location: ./system/application/controllers/welcome.php */
you have load helper. function site_url()
provided url
helper, as described here.
$this->load->helper('url');
Comments
Post a Comment