Skip to content
Alex van den Berg edited this page May 3, 2022 · 4 revisions

LightWine Framework

LightWine is a PHP framework that can be used for creating websites and webapplications. To use the framework you must follow the installation manual.

Installation

Install using Composer

Use this command to download and install the Composer package of our framework.

composer require sibra-soft/light-wine-framework

Add the .htaccess file

Use this .htaccess file to make sure all the requests are routed through the framework.

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]
RewriteRule ^(.+)\.json$ /index.php [NC,L]

Load the framework

Use the code bellow to load the framework, and add the specified application configuration file.

session_start();

require_once ('vendor/autoload.php');

use LightWine\Bootloader;

$framework = new Bootloader;
$framework->AddConfigurationFile("./app-config.json");
$framework->Run();
Clone this wiki locally