A Controller is basicly a class file that is named in a way that can be linked with url.
understood this URL:
abc.com/index.php/about/
In the above URL, CodeIgniter would search to find a controller namely about.php and load it.
Now crating a simple controller in CodeIgniter:
<?php
class About extends CI_Controller {
public function index()
{
echo 'my controller';
}
}
?>
put this file below listed path:
application->controller/about.php
No comments:
Post a Comment