feulf / rainframework

Easy MVC Framework for PHP

Home Page:https://rainphp.github.io/rainframework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

require DB.php

adamhesim opened this issue · comments

You seem to have an issue in the latest version,
function init_db at Loader.php:238 try to access DB::DEFAULT_CONNECTION_NAME
but DB.php is never included or required.
This cause an "Fatal error: Class 'DB' not found".

I solved it just by adding
require_once LIBRARY_DIR . "DB.php";

at Loader.php:20

its fixed. In db config missing <?php at beginn and change loader