zmena implementacie suborov, ukladanie na filesystem a nie do DB
This commit is contained in:
13
config.php
13
config.php
@ -7,6 +7,19 @@ if (file_exists('c:/php/includes/igor.php')) {
|
||||
require_once __DIR__.'/lib/functions.inc.php';
|
||||
require_once __DIR__.'/lib/Medoo/src/Medoo.php';
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
|
||||
$host = $_SERVER['HTTP_HOST'];
|
||||
$uri = $_SERVER['REQUEST_URI']; // obsahuje aj query string
|
||||
|
||||
|
||||
define('URL_PREFIX', $protocol.$host.str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']));
|
||||
|
||||
define('UPLOAD_DIR_ATTACHMENTS', __DIR__.'/data/attachments/');
|
||||
if (!file_exists(UPLOAD_DIR_ATTACHMENTS)) {
|
||||
mkdir(UPLOAD_DIR_ATTACHMENTS, 0777, true);
|
||||
}
|
||||
define('UPLOAD_URL_ATTACHMENTS', URL_PREFIX.'data/attachments/');
|
||||
|
||||
global $db;
|
||||
$db = new Medoo\Medoo([
|
||||
'type' => 'sqlite',
|
||||
|
||||
Reference in New Issue
Block a user