-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.inc.php
38 lines (38 loc) · 1.08 KB
/
main.inc.php
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
<?php
if (!class_exists('hpl_import')) {
include (strtr(dirname(__FILE__), '\\', '/') . '/system/func_arg/main.inc.php');
/**
* @about - import file.
*/
class hpl_import {
/** Importing a file function for include.
* @access - public function
* @param - string $file (file path)
* @return - boolean|data
* @usage - hpl_import::from($file);
*/
public static function from($file = null) {
if (!hpl_func_arg :: delimit2error() && !hpl_func_arg :: string2error(0)) {
//note that the error is all access
$result = include (strtr($file, '\\', '/'));
return $result;
}
return false;
}
/** Importing a file function for include_once.
* @access - public function
* @param - string $file (file path)
* @return - boolean|data
* @usage - hpl_import::from_once($file);
*/
public static function from_once($file = null) {
if (!hpl_func_arg :: delimit2error() && !hpl_func_arg :: string2error(0)) {
//note that the error is all access
$result = include_once (strtr($file, '\\', '/'));
return $result;
}
return false;
}
}
}
?>