简体   繁体   中英

Call Smarty php function from ajax

I want to call smarty PHP function from smarty.tpl on the change event of a dropdown . Is it possible through ajax? Or any other easy go for that?

Smarty is a template module on top of php. So basically smarty functions are php functions. You don't need ajax to call it, you can call it directly, you just need to register it.

Here is how to do it: http://www.smarty.net/docsv2/en/api.register.function.tpl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM