Is it like this:
Code: Select all
Blog index:
http://localhost/Blog/ or http://localhost/Blog/index
New post:
http://localhost/Blog/new_postCode: Select all
class Blog // implements Controller; extends Controller
{
public function index()
{
$this->get_view('blog_index');
}
public function new_post()
{
$this->get_view('blog_new_post');
}
}Example:
Code: Select all
public function get_post($id = null)
{
if (!is_null($id))
{
// querying post
}
}Code: Select all
Getting searched post:
http://localhost/Blog/get_post/id (http://localhost/Blog/get_post/1)In $_GET, that would be like this:
Code: Select all
http://localhost/index.php?controller=Blog&method=get_post¶meter1=idCode: Select all
http://localhost/Blog/get_post/id/name/something_elseCode: Select all
http://localhost/index.php?controller=Blog&method=get_post¶meter1=id¶meter2=name¶meter3=something_elseI hope you understand what I mean, so please help