首页 - 文章搜索

Jun

30

在 XSLTProcessor 中 registerPHPFunctions 后无法调用 php 函数

XSLT 是一个非常方便的转换 XML 的工具,PHP 里面是通过 XSLTProcessor 来实现;XSLT 中内置了许多有用的函数,同时,只需要调用 XSLTProcessor  实例的 registerPHPFunctions 方法,我们就可以在 XSLT 中直接使用 PHP 的函数,这大大增强了 XSLT 的处理能力。

但是,在 XSLT 中使用 PHP 函数时,很多人会遇到 “Warning: XSLTProcessor::trans bound to undefined prefix php” 的错误提示。如果你也遇到这个问题,那请继续浏览本文吧!
共 1 条记录 10/页 共 1 页      1