This article mainly introduces the DedeCms custom field call length truncation method. if you need it, refer to the next article to introduce the DedeCms custom field call length truncation method, for more information, see test.
Dedecms Template: www.php1.cn/xiazai/code/dedecms
Method 1: run the php method ..
[Field: test runphp = yes] @ me = substr (@ me, intercept byte) [/field: test]
Method 2: Call the built-in function method
[Field: test function = 'CN _ substr (@ me, truncation byte) '/]
The two methods are similar.
The second method is more suitable for Chinese interception. it is a built-in function encapsulated by dedecms.
The effect is much better than the first one ..
The above is the detailed content of the two methods for intercepting the call length of the DedeCms custom field. For more information, see other related articles in the first PHP community!