Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 971837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:01:39+00:00 2026-05-16T03:01:39+00:00

ok yesterday i open a thread about when to use mvc, today I’m about

  • 0

ok yesterday i open a thread about when to use mvc,

today I’m about to learn how MVC frameworks work, examining some examples like CI, CAKE, etc

  1. on the .htaccess i found this

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/?url=$1 [QSA,L]

ok so when we type http://localhost/mymvc/something1/something2/something3/somethingetc

we got an $_GET['url'] =string ‘something1/something2/something3/somethingetc’ (length=45)

2.so I suggest the something1 will be the class, something2 must be the function and something3 im not quite sure, how does exectly framework loads the class ?, functions ?

class Blog extends Controller {

    function index()
    {
        echo 'Hello World!';
    }
    function stack()
    {
        echo 'Hello Stack!';
    }      
}

3.ok so , i found that every framework first loads the config files, then loads a front-controller this is a front-controller ( on ci ) looks, i assume that they do like this ?

  • extends the class ?
  • they get the name of the class ? then require_once controller.nameclass.php
  • then they somehow search for functions ? ( how do they do that ? )
  • next they look for the default function ( function index ) then loads it ?
  • if there is a client call the url /Blog/stack it loads just the Stack function, i dont >know how that work either .
  • if we put $this->loadview(‘something’) so i assume that they call the function loadview ( that is inside the Controller class and require them by the name, like require_once something.php

Maybe there is a part two of this :|,

Thanks a lot.

Adam Ramadhan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:01:39+00:00Added an answer on May 16, 2026 at 3:01 am
    1. The framework that built this .htaccess file, uses PHP to decompose its elements (possibly slower than Apache would do it with more complex declarations in .htaccess)
    2. Yes, it determines the class (Controller) and the method to call (Action), and passes the rest of the parameters to that method. It uses call_user_func or something similar to call the functionality after the framework’s core functionality has executed.
    3. A function presence can be checked also. PHP has some basic Reflection implementation, which allows you to see what the class/object is built of.

    Controller classes in many cases inherit a base class, for this functionality.

    This doesn’t really give you much. You’d have better luck with the frameworks if you learn how to work with it, not how it works.

    It might help if you take a course of pure MVC (not linked to any framework), or if you’re in a hurry, try this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yesterday I was having fully compiled ASP.NET MVC 3.0 project. Today when i opened
I asked a question yesterday about a little app that I would like to
Yesterday, I found myself writing code like this: SomeStruct getSomeStruct() { SomeStruct input; cin
Yesterday, I have a discussion with my colleagues about HTTP. It is asked why
Ok, I am very confused. Yesterday it worked just fine. Today suddenly I start
Since yesterday everytime I open my layout Editor in Eclipse for the Android UI
yesterday afternoon Visual Studio 2008 suddenly started taking a really long time to open
Yesterday I was working on a shell script to perform some moderately complex table
it's a quesion about mercurial. I'm not a unix - guy, but use a
Yesterday I wanted to add a boolean field to an Oracle table. However, there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.