本文整理汇总了PHP中clsTinyButStrong::f_Xml_GetPart方法的典型用法代码示例。如果您正苦于以下问题:PHP clsTinyButStrong::f_Xml_GetPart方法的具体用法?PHP clsTinyButStrong::f_Xml_GetPart怎么用?PHP clsTinyButStrong::f_Xml_GetPart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clsTinyButStrong
的用法示例。
在下文中一共展示了clsTinyButStrong::f_Xml_GetPart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: meth_Merge_AutoSpe
function meth_Merge_AutoSpe(&$Txt, &$Loc)
{
// Merge Special Var Fields ([var..*])
$ErrMsg = false;
$SubStart = false;
if (isset($Loc->SubLst[1])) {
switch ($Loc->SubLst[1]) {
case 'now':
$x = time();
break;
case 'version':
$x = $this->Version;
break;
case 'script_name':
$x = basename(isset($_SERVER) ? $_SERVER['PHP_SELF'] : $GLOBALS['HTTP_SERVER_VARS']['PHP_SELF']);
break;
case 'template_name':
$x = $this->_LastFile;
break;
case 'template_date':
$x = '';
if ($this->f_Misc_GetFile($x, $this->_LastFile, '', array(), false)) {
$x = $x['mtime'];
}
break;
case 'template_path':
$x = dirname($this->_LastFile) . '/';
break;
case 'name':
$x = 'TinyButStrong';
break;
case 'logo':
$x = '**TinyButStrong**';
break;
case 'charset':
$x = $this->Charset;
break;
case 'error_msg':
$this->_ErrMsgName = $Loc->FullName;
return $Loc->PosEnd;
break;
case '':
$ErrMsg = 'it doesn\'t have any keyword.';
break;
case 'tplvars':
if ($Loc->SubNbr == 2) {
$SubStart = 2;
$x = implode(',', array_keys($this->TplVars));
// list of all template variables
} else {
if (isset($this->TplVars[$Loc->SubLst[2]])) {
$SubStart = 3;
$x =& $this->TplVars[$Loc->SubLst[2]];
} else {
$ErrMsg = 'property TplVars doesn\'t have any item named \'' . $Loc->SubLst[2] . '\'.';
}
}
break;
case 'store':
if ($Loc->SubNbr == 2) {
$SubStart = 2;
$x = implode('', $this->TplStore);
// concatenation of all stores
} else {
if (isset($this->TplStore[$Loc->SubLst[2]])) {
$SubStart = 3;
$x =& $this->TplStore[$Loc->SubLst[2]];
} else {
$ErrMsg = 'Store named \'' . $Loc->SubLst[2] . '\' is not defined yet.';
}
}
if (!isset($Loc->PrmLst['strconv'])) {
$Loc->PrmLst['strconv'] = 'no';
$Loc->PrmLst['protect'] = 'no';
}
break;
case 'cst':
$x = @constant($Loc->SubLst[2]);
break;
case 'tbs_info':
$x = 'TinyButStrong version ' . $this->Version . ' for PHP 4';
$x .= "\r\nInstalled plug-ins: " . count($this->_PlugIns);
foreach (array_keys($this->_PlugIns) as $pi) {
$o =& $this->_PlugIns[$pi];
$x .= "\r\n- plug-in [" . (isset($o->Name) ? $o->Name : $pi) . '] version ' . (isset($o->Version) ? $o->Version : '?');
}
break;
case 'php_info':
ob_start();
phpinfo();
$x = ob_get_contents();
ob_end_clean();
$x = clsTinyButStrong::f_Xml_GetPart($x, '(style)+body', false);
if (!isset($Loc->PrmLst['strconv'])) {
$Loc->PrmLst['strconv'] = 'no';
$Loc->PrmLst['protect'] = 'no';
}
break;
default:
$IsSupported = false;
//.........这里部分代码省略.........