Zend追加文件调整
如何多次包含相同的 .js 文件,但它只会将其添加到标头一次。这个想法类似于 PHP 中的 include 和 include_once 函数。我正在使用以下 zend 框架函数。和想法将不胜感激。
appendFile($src, $type = 'text/javascript', $attrs = array())
How can I include a same .js file multiple times but it will add it to the header only once. The idea is similar to include and include_once function in PHP. I am using the following zend framework function. And idea would be appreciated.
appendFile($src, $type = 'text/javascript', $attrs = array())
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两种可能性:
$view->headScript()->getContainer()
) 以检查文件是否已存在There are two possibilities:
$view->headScript()->getContainer()
) to check whether the file already exists