config.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. include __DIR__ . "/auth.php";
  3. if (isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == 1) || isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https") {
  4. $root = "https://" . $_SERVER["HTTP_HOST"] . "/";
  5. }
  6. else {
  7. $root = "http://" . $_SERVER["HTTP_HOST"] . "/";
  8. }
  9. $base_dir = $_SERVER["DOCUMENT_ROOT"];
  10. $path = [
  11. "img" => [
  12. "content" => $root . "img/content/",
  13. "layout" => $root . "img/layout/"
  14. ],
  15. "fonts" => $root . "fonts/",
  16. "css" => $root . "css/",
  17. "js" => $root . "js/",
  18. "application" => "$base_dir../application/",
  19. "classes" => "$base_dir../application/class/",
  20. "controller" => "$base_dir../application/class/controller/Controller.php",
  21. "model" => "$base_dir../application/class/model/",
  22. "view" => "$base_dir../application/class/view/",
  23. "helper" => "$base_dir../application/helper/",
  24. "string" => "$base_dir../application/class/view/string/"
  25. ];
  26. ?>