insert-coin/res/library/main.php

29 lines
731 B
PHP
Raw Normal View History

<?php
2018-10-09 19:39:09 -05:00
// PROJECT_ROOTDIR_NAME --> ABSOLUTE_PATH_TO_PROJECT_DIR
// Return the absolute path to the project's root.
function get_project_root()
{
return preg_replace("%" . $GLOBALS["root_name"] . ".*" . "%",
$GLOBALS["root_name"] . "/",
getcwd());
}
// PATH_RELATIVE_TO_PROJECT_ROOT --> ABSOLUTE_PATH
// Return the absolute path to something within the project's root.
function root($path)
{
$absolute_path = get_project_root() . $path;
return $absolute_path;
}
2019-02-14 09:39:29 -06:00
include(root("res/library/array.php"));
include(root("res/library/file.php"));
include(root("res/library/insert-coin.php"));
include(root("res/library/sanitization.php"));
include(root("res/library/string.php"));
include(root("res/library/urls.php"));
?>