跳至内容
Smarty 文档
strlen
正在初始化搜索
主页
开始使用
语言参考
API
Smarty 文档
主页
开始使用
开始使用
介绍
从旧版本升级
语言参考
语言参考
基本语法
基本语法
介绍
注释
变量
运算符
标记
属性
引号
转义 Smarty 解析
变量
变量
介绍
从 PHP 分配
变量作用域
从配置文件
{$smarty}
修饰符
修饰符
介绍
capitalize
cat
count
count_characters
count_paragraphs
count_sentences
count_words
date_format
debug_print_var
default
escape
from_charset
indent
is_array
isset
join
json_encode
lower
noprint
number_format
nl2br
raw
regex_replace
replace
round
spacify
split
str_repeat
string_format
strip
strip_tags
strlen
strlen
目录
基本用法
substr
to_charset
truncate
unescape
upper
wordwrap
内置标记
内置标记
介绍
{append}
{assign}
{block}
{call}
{capture}
{config_load}
{debug}
{extends}
{for}
{foreach}
{function}
{if},{elseif},{else}
{include}
{insert}
{ldelim},{rdelim}
{literal}
{nocache}
{section}
{setfilter}
{strip}
{while}
自定义标记
自定义标签
介绍
{counter}
{cycle}
{debug}
{eval}
{fetch}
{html_checkboxes}
{html_image}
{html_options}
{html_radios}
{html_select_date}
{html_select_time}
{html_table}
{mailto}
{math}
{textformat}
配置文件
调试控制台
API
API
基础
配置 Smarty
渲染一个模板
在模板中使用数据
在模板中使用数据
分配变量
配置文件
使用 stream
对象
静态类方法
模板继承
过滤器
过滤器
输出过滤器
预过滤器
后过滤器
模板资源
缓存
缓存
基础
为每个模板创建多个缓存
自定义缓存存储图层
扩展 Smarty
扩展 Smarty
介绍
自定义标签
自定义块标签
自定义修饰符
创建扩展
安全
目录
基本用法
strlen
返回给定字符串中的长度(字符数),包括空格。
基本用法
{
"Smarty"
|
strlen
}
# renders: 6
{
156
|
strlen
}
# renders: 3