config.php 1.3 KB

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