config.php 610 B

123456789101112131415161718
  1. <?php
  2. define("ENVIRONMENT", getenv("ENVIRONMENT") ?? "production");
  3. define("ROOT_PATH", dirname(__FILE__));
  4. define("SYSTEM_PATH", "/var/daktylos");
  5. define("LOG_PATH", SYSTEM_PATH . '/logs/');
  6. define("DATA_PATH", SYSTEM_PATH . '/data/');
  7. define("DBNAME", "daktylos-".ENVIRONMENT.".sqlite3");
  8. define("BUCKET_PREFIX", ENVIRONMENT != "production" ? ENVIRONMENT . "-" : "");
  9. function daktylos_autoload($classname){
  10. require_once ROOT_PATH . "/libs/" . $classname . ".class.php";
  11. }
  12. spl_autoload_register("daktylos_autoload");
  13. session_start();
  14. define("DOMAIN",explode(".", strtolower($_SERVER['HTTP_HOST']))[0]);