本文整理汇总了PHP中base::sysPath方法的典型用法代码示例。如果您正苦于以下问题:PHP base::sysPath方法的具体用法?PHP base::sysPath怎么用?PHP base::sysPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base
的用法示例。
在下文中一共展示了base::sysPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: php
public function php()
{
$info = array('php_uname()' => php_uname('a'), 'phpversion()' => phpversion(), 'php_sapi_name()' => php_sapi_name(), 'PHP_OS' => PHP_OS, 'DIRECTORY_SEPARATOR' => DIRECTORY_SEPARATOR, 'PATH_SEPARATOR' => PATH_SEPARATOR, 'PHP_SHLIB_SUFFIX' => PHP_SHLIB_SUFFIX, 'sys_get_temp_dir()' => sys_get_temp_dir(), 'Platform' => LEPTON_PLATFORM_ID);
$comp = array('COMPAT_GETOPT_LONGOPTS' => PHP_VERSION >= "5.3" ? 'Supported' : 'Emulated (PHP >= 5.3)', 'COMPAT_SOCKET_BACKLOG' => PHP_VERSION >= "5.3.3" ? 'Supported' : 'Missing (PHP >= 5.3.3)', 'COMPAT_HOST_VALIDATION' => PHP_VERSION >= "5.2.13" ? 'Supported' : 'Emulated (PHP >= 5.2.13)', 'COMPAT_NAMESPACES' => PHP_VERSION >= "5.3.0" ? 'Supported' : 'Missing (PHP >= 5.3.0)', 'COMPAT_INPUT_BROKEN' => PHP_VERSION >= "5" && PHP_VERSION < "5.3.1" ? 'php://input possibly broken (PHP >= 5, PHP < 5.3.1)' : 'Functional', 'COMPAT_CALLSTATIC' => PHP_VERSION >= "5.3.0" ? 'Supported' : 'Missing (PHP >= 5.3.0)', 'COMPAT_CRYPT_BLOWFISH' => PHP_VERSION >= "5.3.0" ? 'Supported' : 'Missing (PHP >= 5.3.0)', 'COMPAT_PHP_FNMATCH' => PHP_OS == "Linux" || PHP_OS == "Windows" && PHP_VERSION >= "5.3" ? 'Native' : 'Emulated (WIN + PHP >= 5.3.0)');
$opts = array('base::basePath()' => base::basePath(), 'base::appPath()' => base::appPath(), 'base::sysPath()' => base::sysPath(), 'TMP_PATH' => TMP_PATH);
Console::writeLn(__astr("\\b{Lepton Overview:}"));
foreach ($opts as $key => $val) {
Console::writeLn(" %-25s : %s", $key, $val);
}
Console::writeLn();
Console::writeLn(__astr("\\b{PHP Overview:}"));
foreach ($info as $key => $val) {
Console::writeLn(" %-25s : %s", $key, $val);
}
Console::writeLn();
Console::writeLn(__astr("\\b{Compatibility layer overview:}"));
foreach ($comp as $key => $val) {
Console::writeLn(" %-25s : %s", $key, $val);
}
Console::writeLn();
}
示例2: getDebugInformation
static function getDebugInformation()
{
if (self::isSecure()) {
$ssl = 'Yes (' . $_SERVER['SSL_TLS_SNI'] . ')';
} else {
$ssl = 'No';
}
return join("\n", array("Request time: " . date(DATE_RFC822, $_SERVER['REQUEST_TIME']), "Base path: " . base::basePath(), "App path: " . base::appPath(), "Sys path: " . base::sysPath(), "User-agent: " . $_SERVER['HTTP_USER_AGENT'], "Request URI: " . $_SERVER['REQUEST_URI'], "Request method: " . $_SERVER['REQUEST_METHOD'], "Authenticated user: " . (user::isAuthenticated() ? user::getActiveUser()->uuid : 'n/a'), "Remote IP: " . $_SERVER['REMOTE_ADDR'] . " (" . gethostbyaddr($_SERVER['REMOTE_ADDR']) . ")", "Hostname: " . $_SERVER['HTTP_HOST'], "Secure: " . $ssl, "Referrer: " . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'null'), sprintf("Running as: %s (uid=%d, gid=%d) with pid %d", get_current_user(), getmyuid(), getmygid(), getmypid()), sprintf("Server: %s", $_SERVER['SERVER_SOFTWARE']) . " (" . php_sapi_name() . ")", sprintf("Memory allocated: %0.3f KB (Total used: %0.3f KB)", memory_get_usage() / 1024 / 1024, memory_get_usage(true) / 1024 / 1024), "Platform: " . LEPTON_PLATFORM_ID, sprintf("Runtime: PHP v%d.%d.%d (%s)", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, PHP_OS)));
}
示例3: _mangleModulePath
/**
*
*/
static function _mangleModulePath($module)
{
// Console::debugEx(LOG_LOG,__CLASS__,"Mangling module %s", $module);
if (preg_match('/^app\\./', $module)) {
$path = base::appPath() . '/' . str_replace('.', '/', str_replace('app.', '', $module)) . '.php';
} else {
$path = base::sysPath() . '/' . str_replace('.', '/', $module) . '.php';
}
// Console::debugEx(LOG_LOG,__CLASS__," -> %s", $path);
return $path;
}
示例4: __set
return null;
}
function __set($key, $value)
{
switch ($key) {
case 'red':
case 'r':
$this->red = $this->bounds($value);
break;
case 'green':
case 'g':
$this->green = $this->bounds($value);
break;
case 'blue':
case 'b':
$this->blue = $this->bounds($value);
break;
case 'alpha':
case 'a':
$this->alpha = 255;
}
}
}
function pantone($pms)
{
return new PantoneColor($pms);
}
$fn = base::sysPath() . 'lepton/graphics/colorspaces/pantone.sd';
if (file_exists($fn)) {
globals::set('pantonescale', unserialize(file_get_contents($fn)));
}