PHP 5.2.x 资产管理库

发布于 2024-11-24 19:32:51 字数 209 浏览 3 评论 0原文

除了 Assetic (由于 PHP 版本我无法使用)之外,还有什么可以进行资产管理吗?

编辑: 这是关于 Web 应用程序资产,例如 javascript 和 css,这是一个用于管理和缩小它们以用于生产的库,无论是在运行时还是使用预编译的资产。

Is there anything but Assetic (which I cannot use because of PHP version) that can do asset management?

EDIT:
This is about web application assets, like javascript and css, a library to manage and minify them for production, be that on the run or with precompiled assets.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单挑你×的.吻 2024-12-01 19:32:51

您最好的选择可能是将 Assetic 向后移植到 PHP 5.2。 usenamespace 语句需要替换为自动加载函数和对 spl_autoload_register() 的调用。

它看起来相当全面,尽管它可能缺乏引用外部托管脚本的能力,例如从 CDN 调用 jQuery。

就我个人而言,我使用 Smarty 模板引擎和一些前置过滤器/后置过滤器函数来处理样式表和 javascript 包含。如果您正在使用另一个模板系统,则可能会在另一个模板系统中实现类似的技巧。

Your best bet is probably to backport Assetic to PHP 5.2. The use and namespace statements would need to be replaced with an autoload function and a call to spl_autoload_register().

It looks pretty comprehensive, although it might lack the ability to reference an externally hosted script, like calling jQuery from a CDN.

Personally, I use the Smarty template engine, and some prefilter/postfilter functions to handle stylesheet and javascript includes. A similar trick might be possible in another template system, if you're using one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文