有没有使用正则表达式或其他方法来清理html页面的php脚本?

发布于 2024-12-15 19:06:07 字数 186 浏览 4 评论 0原文

这是我的想法,我想创建一个工具,可以创建静态 html 页面,从 php 页面中,也许由 cms 生成。

然后我想使用某种正则表达式或干净的工具来重新组织 html 以生成更干净、更标准化、符合 yslow 的 html 页面。

我可能会问什么不存在,如果是的话,有什么近亲解决方案的建议吗?

感谢您抽出时间。

Here is my idea, I want to create a tool that can create static html pages, out of php pages, perhaps generated by a cms.

Then I want to use some kind of regex, or clean tool, to reorganize the html to generate a cleaner, more standardized, yslow compliant html pages.

I may asking for what does not exist, if so, any suggestions for a close cousin solution?

Thank you for your time.

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

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

发布评论

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

评论(1

┾廆蒐ゝ 2024-12-22 19:06:07

看看 Tidy: http://php.net/manual/en/book.tidy .php

非常适合清理 html。

不是正则表达式,而是扩展。

Take a look at Tidy: http://php.net/manual/en/book.tidy.php

Works great for cleaning up html.

Not regex but an extension.

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