新版的smarty修改注册修改器的方法

Example 14.41. register modifier plugin

<?php

// let's map PHP's stripslashes function to a Smarty modifier.
$smarty->registerPlugin("modifier","ss", "stripslashes");

?>

In the template, use ss to strip slashes.

<?php
{$var|ss}
?>


你可能感兴趣的:(register,修改器)