01-06-2019, 12:28 PM
I installed Codeigniter for the first time, read documentation.
According to docs, the URI consists of set of segments:
But that scheme doesn't work for me out of the box. I've created blank controller application/controllers/Blog.php, and tested url
The result was Error 404.
Here is the code of the controller:
base_url at application/config/config.php is set correctly to the server name.
So the problem is, that default controller at
works, but everything else doesn't respond.
According to docs, the URI consists of set of segments:
PHP Code:
http://example.com/index.php/[controller-class]/[controller-method]/[arguments]
PHP Code:
http://example.com/index.php/blog
Here is the code of the controller:
PHP Code:
<?php
class Blog extends CI_Controller {
public function index()
{
echo 'Hello World!';
}
}
So the problem is, that default controller at
PHP Code:
http://example.com/
and
http://example.com/index.php
works, but everything else doesn't respond.