本文整理汇总了PHP中Uk86Language::uk86_getlangcontent方法的典型用法代码示例。如果您正苦于以下问题:PHP Uk86Language::uk86_getlangcontent方法的具体用法?PHP Uk86Language::uk86_getlangcontent怎么用?PHP Uk86Language::uk86_getlangcontent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Uk86Language
的用法示例。
在下文中一共展示了Uk86Language::uk86_getlangcontent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeallcache
public static function makeallcache($type)
{
Uk86Language::uk86_read("core_lang_index");
$lang = Uk86Language::uk86_getlangcontent();
$time = time();
switch ($type) {
case "area":
$file_list = uk86_readfilelist(BASE_DATA_PATH . DS . "cache" . DS . "flea_area");
if (is_array($file_list)) {
foreach ($file_list as $v) {
@unlink(BASE_DATA_PATH . DS . "cache" . DS . "flea_area" . DS . $v);
}
}
$maxdeep = 1;
default:
$param = array();
$param['table'] = "flea_area";
$param['where'] = "flea_area_deep = '" . $maxdeep . "'";
$param['order'] = "flea_area_sort asc";
$result = Db::select($param);
if (!empty($result)) {
$cache_file_area = BASE_DATA_PATH . DS . "cache" . DS . "area" . DS . "flea_area_" . $maxdeep . ".php";
$tmp .= "<?php \r\n";
$tmp .= "defined('InUk86') or exit('Access Invalid!'); \r\n";
$tmp .= "\$data = array(\r\n";
if (is_array($result)) {
foreach ($result as $k => $v) {
$tmp .= "\tarray(\r\n";
$tmp .= "\t\t'flea_area_id'=>'" . $v['flea_area_id'] . "',\r\n";
$tmp .= "\t\t'flea_area_name'=>'" . htmlspecialchars($v['flea_area_name']) . "',\r\n";
$tmp .= "\t\t'flea_area_parent_id'=>'" . $v['flea_area_parent_id'] . "',\r\n";
$tmp .= "\t\t'flea_area_sort'=>'" . $v['flea_area_sort'] . "',\r\n";
$tmp .= "\t\t'flea_area_deep'=>'" . $v['flea_area_deep'] . "',\r\n";
$tmp .= "\t),\r\n";
}
}
$tmp .= ");";
try {
$fp = @fopen($cache_file_area, "wb+");
if (fwrite($fp, $tmp) === FALSE) {
$error = $lang['please_check_your_system_chmod_area'];
throw new Exception();
}
unset($tmp);
@fclose($fp);
} catch (Exception $e) {
uk86_showmessage($e->getMessage(), "", "exception");
}
}
++$maxdeep;
}
}