本文整理汇总了PHP中lang::getLang方法的典型用法代码示例。如果您正苦于以下问题:PHP lang::getLang方法的具体用法?PHP lang::getLang怎么用?PHP lang::getLang使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lang
的用法示例。
在下文中一共展示了lang::getLang方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDB
public static function getDB($key = 'default')
{
self::clearErr();
if (empty($key)) {
$this->code = 1023;
$this->msg = lang::getLang('learn', 'param_error');
}
$config = cfg_db::$default;
if (isset($dbResMap[$key])) {
if (self::$dbResMap[$key]->selectDB($config['db'])) {
return self::$dbResMap[$key];
}
if (self::$dbResMap[$key]->selectDB($config['db'])) {
return self::$dbResMap[$key];
}
$dbResMap[$key]->closeDB();
unset($dbResMap[$key]);
return false;
}
$db = new db($config['host'], $config['port'], $config['db'], $config['user'], $config['password']);
if ($db->errCode > 0) {
self::$code = 1024;
self::$msg = "todo";
return false;
}
self::$dbResMap[$key] = $db;
return self::$dbResMap[$key];
}
示例2: check_app_params
public final function check_app_params()
{
if (!in_array($this->projectId, array_keys(self::$projects))) {
$this->setError(1101, lang::getLang('param_error'));
return false;
}
if ($this->version) {
$this->setError(1102, "参数错误");
return false;
}
if ($this->vn) {
$this->setError(1103, "签名错误");
return false;
}
if ($this->client) {
$this->setError(1104, "签名错误");
return false;
}
if ($this->token) {
$this->setError(1105, "签名错误");
return false;
}
if (!$this->init_verifySign()) {
$this->setError(1106, "签名错误");
return false;
}
self::$code = 200;
self::$msg = "正常";
return true;
}
示例3: language
/**
* 加栽语言文件
*/
public static function language($files)
{
$lang = lang::getLang();
if (is_array($files)) {
foreach ($files as $file) {
self::loadfile($lang . "/" . $file, "language");
}
return true;
}
return self::loadfile($lang . "/" . $files, "language");
}
示例4: includeAllLangFiles
public static function includeAllLangFiles()
{
foreach (self::getAll() as $name) {
$file = dir::addon($name, 'lang/' . lang::getLang() . '.json');
if (file_exists($file)) {
lang::loadLang($file);
}
$defaultFile = dir::addon($name, 'lang/' . lang::getDefaultLang() . '.json');
if (file_exists($defaultFile)) {
lang::loadLang($defaultFile, true);
}
}
}
示例5: error_reporting
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
include '..' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'dir.php';
new dir();
include_once dir::classes('autoload.php');
autoload::register();
autoload::addDir(dir::classes('utils'));
autoload::addDir('lib' . DIRECTORY_SEPARATOR . 'classes');
include dir::functions('html_stuff.php');
include dir::functions('url_stuff.php');
new dyn();
lang::setDefault();
lang::setLang(dyn::get('lang'));
lang::loadLang('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . lang::getLang() . '.json');
$page = type::super('page', 'string', 'licence');
ob_start();
include "layout/index.php";
$out = ob_get_contents();
ob_get_clean();
echo $out;