简体   繁体   English

如何在JS文件(与Symfony)一起使用PHP?

[英]How to use PHP inside JS files (with Symfony)?

I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/ 我发现了这一点: http : //www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/

But I saw that it has already been built into Symfony with the use_dynamic_javascript() AssetHelper. 但是我看到它已经通过use_dynamic_javascript() AssetHelper内置到Symfony中。

I can't find any documentation for using this helper though. 我找不到任何有关使用此助手的文档。 Any examples, links, or anything to help? 有任何示例,链接或任何有帮助的内容吗? Thanks. 谢谢。

我最终使用了这种方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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