config.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. require_once(__DIR__ . "/auth.php");
  3. require_once(__DIR__ . "/../helper/net.php");
  4. /**
  5. * Server base url, including protocol, without language indicator.
  6. * It may be overwritten by the controller to add the language.
  7. */
  8. $base_url = get_protocol() . $_SERVER["HTTP_HOST"];
  9. $static_url = get_protocol() . $_SERVER["HTTP_HOST"];
  10. /**
  11. * Static url, absolute, language independant.
  12. */
  13. $static = [
  14. "layout" => $static_url . "/img/layout/",
  15. "content" => $static_url . "/img/content/",
  16. "fonts" => $static_url . "/fonts/",
  17. "css" => $static_url . "/css/",
  18. "demo" => $static_url . "/demo/",
  19. "js" => $static_url . "/js/",
  20. "cv" => $static_url . "/cv/"
  21. ];
  22. /**
  23. * Server document root.
  24. */
  25. $base_dir = $_SERVER["DOCUMENT_ROOT"];
  26. /**
  27. * Paths within the server.
  28. */
  29. $path = [
  30. "application" => $base_dir . "/../application/",
  31. "controller" => $base_dir . "/../application/Controller.php",
  32. "entity" => $base_dir . "/../application/entity/",
  33. "page" => $base_dir . "/../application/page/",
  34. "helper" => $base_dir . "/../application/helper/",
  35. "view" => $base_dir . "/../application/view/",
  36. "inc" => $base_dir . "/../application/view/inc/",
  37. "string" => $base_dir . "/../application/view/string/"
  38. ];
  39. ?>