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} ?>
转载于:https://blog.51cto.com/freax/1396252