1. Go to this page and download the library: Download linna/app library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
linna / app example snippets
$options = [
'app' => [
//protocol utilized [http://, https://]
//default value set automatically
'protocol' => REQUEST_SCHEME.'://',
//folder of the app, if app isn't in the web server root add a
//directory (/app, /other/app) else insert a / (slash) as value
//default value [/app]
'subFolder' => '/app',
//public folder of the app, starting from web server root
//default value [/app/public]
'publicFolder' => '/app/public',
//.env file position, remember to add ../ if don't use an absolute path
'envFile' => '../.env',
//name of the fallback route, indicate the path when router return a NullRoute
//default /error/404
'onNullRoute' => '/error/404'
],
//other options
];
$options = [
//other options
'router' => [
//must be equal to app.subFolder, it represents the part of the path
//that the router ignore when check a route. Example '/app/user/delete/5'
//become '/user/delete/5' where the router subtract the basePath
//default [/app]
'basePath' => '/app',
//url rewriting
//default [true]
'rewriteMode' => true,
//part of the url that the router ignore when url rewriting is off
'rewriteModeOffRouter' => '/index.php?',
],
//other options
];