Init files
This commit is contained in:
parent
a4887d1fc6
commit
42dd4c60f2
23
fcms-configs/config.php
Normal file
23
fcms-configs/config.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
* Параметры сайта (параметры доступа к БД, окружение и т.п.)
|
||||
* @package freecms
|
||||
*/
|
||||
|
||||
namespace freecms;
|
||||
|
||||
/*
|
||||
* FCMS_ENVIRONMENT
|
||||
* Окружение для запуска
|
||||
* Возможные значения:
|
||||
* dev - разработка
|
||||
* test - тестирование на сервере
|
||||
* prod - функционирующее приложение
|
||||
*/
|
||||
const FCMS_ENVIRONMENT = "dev";
|
||||
|
||||
/*
|
||||
* FCMS_DBNAME
|
||||
* Имя БД
|
||||
*/
|
||||
const FCMS_DBNAME = "";
|
25
fcms-core/classes/db.php
Normal file
25
fcms-core/classes/db.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
* Класс для работы с базой данных
|
||||
* @package freecms
|
||||
*/
|
||||
|
||||
namespace freecms\classes;
|
||||
|
||||
//Используем класс PDO для подключения к БД
|
||||
use PDO;
|
||||
|
||||
/*
|
||||
* Класс для работы с БД
|
||||
*/
|
||||
|
||||
class db
|
||||
{
|
||||
// Переменная инициализации PDO
|
||||
private PDO $pdo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->pdo = new PDO ("");
|
||||
}
|
||||
}
|
7
fcms-core/freecms.php
Normal file
7
fcms-core/freecms.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Приложение FreeCMS.
|
||||
* @package FreeCMS
|
||||
*/
|
||||
|
||||
//Подключаем глобальные параметры сервера
|
Loading…
x
Reference in New Issue
Block a user