本文整理汇总了PHP中ET::webPath方法的典型用法代码示例。如果您正苦于以下问题:PHP ET::webPath方法的具体用法?PHP ET::webPath怎么用?PHP ET::webPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ET
的用法示例。
在下文中一共展示了ET::webPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: errorHandler
function errorHandler($code, $message, $file, $line)
{
// Make sure this error code is included in error_reporting.
if ((error_reporting() & $code) != $code) {
return false;
}
ET::fatalError(new ErrorException($message, $code, 1, $file, $line));
}
set_error_handler("errorHandler", E_USER_ERROR);
set_exception_handler(array("ET", "fatalError"));
// Determine the relative path to this forum. For example, if the forum is at http://forum.com/test/forum/,
// the web path should be /test/forum.
$parts = explode("/", $_SERVER["PHP_SELF"]);
$key = array_search("index.php", $parts);
if ($key !== false) {
ET::$webPath = implode("/", array_slice($parts, 0, $key));
}
// Undo register_globals.
undoRegisterGlobals();
// If magic quotes is on, strip the slashes that it added.
if (get_magic_quotes_gpc()) {
$_REQUEST = array_map("undoMagicQuotes", $_REQUEST);
$_GET = array_map("undoMagicQuotes", $_GET);
$_POST = array_map("undoMagicQuotes", $_POST);
$_COOKIE = array_map("undoMagicQuotes", $_COOKIE);
}
//***** 2. INCLUDE CONFIGURATION
// Include our config files.
ET::loadConfig(PATH_CORE . "/config.defaults.php");
// If the config path is different from the default, but there's still a config file at the default location, include it.
if (PATH_CONFIG != PATH_ROOT . "/config" and file_exists($file = PATH_ROOT . "/config/config.php")) {