PHP Nano Framework (WIP)
function Route($route, $action) {
$route = '/^' . str_replace('/','\/',$route) . '$/';
if (preg_match($route, $_GET['url'])) {
$action();
}
}
Route('page/(\d+)', function() {
echo "Hello";
});;
Just throwing some ideas out of my head. All you need is a .htaccess with
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
Basically, I'm working on a one file framework to build micro apps very fast
Comments are only visible to Forrst members. Log in or Request an invite.
