Jump to content

php framework


arif_shariati

Recommended Posts

can any body let me know tutorial for making mvc or other php framework. I need it badly.

 

$controller = getParam('c', $_GET);

switch($controller) {
    case 'about':
        include 'about.php';
        break;
    case 'contact':
        include 'contact.php';
        break;
    default:
        include 'home.php';
        break;
}

function getParam($offset, &$array, $default = null)
{
    if(array_key_exists($offset, $array)) {
        return $array[$offset];
    }
    return $default;
}

 

Is a (very) simple example of MVC. What level of framework are you looking for? CodeIgniter (easy) Symfony (medium) Zend (hard) :D

Link to comment
https://forums.phpfreaks.com/topic/223960-php-framework/#findComment-1157469
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.