mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 22:16:00 -04:00
Fixes include problems as well as Win path problems.
This commit is contained in:
parent
d72ea22fb0
commit
9f10e92175
13 changed files with 158 additions and 70 deletions
|
@ -1,11 +1,23 @@
|
|||
<?php
|
||||
|
||||
require_once "config.php";
|
||||
require_once "inc/H5ai.php";
|
||||
require_once "inc/Crumb.php";
|
||||
require_once "inc/Customize.php";
|
||||
require_once "inc/Extended.php";
|
||||
require_once "inc/Tree.php";
|
||||
function safe_dirname($path, $endWithSlash = false) {
|
||||
|
||||
$path = str_replace("\\", "/", dirname($path));
|
||||
return preg_match("#^(\w:)?/$#", $path) ? $path : (preg_replace('#/$#', '', $path) . ($endWithSlash ? "/" : ""));
|
||||
}
|
||||
|
||||
define("H5AI_ABS_PATH", safe_dirname(safe_dirname(__FILE__)));
|
||||
|
||||
function require_h5ai($lib) {
|
||||
|
||||
require_once(H5AI_ABS_PATH . $lib);
|
||||
}
|
||||
|
||||
require_h5ai("/php/inc/H5ai.php");
|
||||
require_h5ai("/php/inc/Crumb.php");
|
||||
require_h5ai("/php/inc/Customize.php");
|
||||
require_h5ai("/php/inc/Extended.php");
|
||||
require_h5ai("/php/inc/Tree.php");
|
||||
|
||||
$h5ai = new H5ai();
|
||||
$crumb = new Crumb($h5ai);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue