-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
53 lines (44 loc) · 1.01 KB
/
Copy pathinit.php
File metadata and controls
53 lines (44 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Gestionnaire des fichiers de configurations
*
* @package Slrfw
* @subpackage Core
* @author Adrien <aimbert@solire.fr>
* @license Solire http://www.solire.fr/
*/
namespace Slrfw;
header('Content-Type: text/html; charset=utf-8');
define('DS', DIRECTORY_SEPARATOR);
/** Session PHP */
session_name();
session_start();
require 'slrfw/vendor/autoload.php';
$dir = pathinfo(__FILE__, PATHINFO_DIRNAME);
set_include_path(
get_include_path()
. PATH_SEPARATOR . realpath($dir)
);
unset($dir);
require_once 'slrfw/path.php';
/* = Autoload
------------------------------- */
/**
* Chargement de classes dynamiquement
*
* @param string $name nom de la classe à charger
*
* @return void
*/
function autoload($name)
{
$name = str_replace('\\', DS, $name);
$name = strtolower($name) . '.php';
$path = new Path($name, Path::SILENT);
$fullPath = $path->get();
if ($fullPath) {
include_once $path->get();
}
}
spl_autoload_register('Slrfw\autoload');
$debug = false;