📄 modifier.replace.php
字号:
<?php
/**
* template_lite replace modifier plugin
*
* Type: modifier
* Name: replace
* Purpose: Wrapper for the PHP 'str_replace' function
* Credit: Taken from the original Smarty
* http://smarty.php.net
* ADDED: { $text|replace:",,,,":",,,," }
* @modifier 枯木 <www.iDreamSoft.cn> 17:38 2007-11-13
*/
function tpl_modifier_replace($string, $search, $replace)
{
if(strpos($search,',')){
$s=explode(',',$search);
$r=explode(',',$replace);
foreach($s AS $k=>$v){
$string=str_replace($v,$r[$k], $string);
}
}else{
$string=str_replace($search, $replace, $string);
}
return $string;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -