The configuration for Liten is easy, simple and you can follow the example in the main index.php application file.
Contents
System Requirements
PHP 5.4+
Rewrite Rules
.htaccess
1 2 3 4 5 6 7 8 9 10 11 |
RewriteEngine On # Some hosts may require you to use the `RewriteBase` directive. # If you need to use the `RewriteBase` directive, it should be the # absolute physical path to the directory that contains this htaccess file. # # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] |
Nginx (root directory)
1 2 3 |
location / { try_files $uri /index.php$is_args$args; } |
Nginx (subdirectory)
1 2 3 |
location /liten { try_files $uri /liten/index.php$is_args$args; } |
Hello World
To get started using the framework, you will need to instantiate a Liten application like below.
1 |
$app = new \Liten\Liten(); |
Once it is instantiated, you can create a new route:
1 2 3 |
$app->get('/hello/(\w+)/' function($name) { echo "Howdy, $name"; } |
Last Modified:
Liten Framework › Forums › Configuration