雇员再培训局PHP 一起。 *.php.erb?

发布于 2024-10-01 12:01:47 字数 430 浏览 3 评论 0原文

当我开发 ruby​​ 时,我必须与另一个使用 php 开发的团队合作。通常这不是问题,因为他们通常会将源代码交给我来完成。我更喜欢部署 Rails 应用程序的原因有很多,而 PHP 是此时的折衷方案。我现在不仅要处理他们的 php,而且他们还签署了更新网站的合同。

我问他们是否知道他们是否要进行内容更新或代码更新或两者兼而有之,但他们目前还不确定。

我想做的是使用 .php.erb 文件来允许他们使用他们的 php,即使代码并不总是遵循最佳实践,但它可以完成工作。这样我只对我负责的部分负责,而不维护任何当他们改变网站结构时我不会得到报酬的东西。

是否可以允许他们使用 <%= render :partial => “形式”%>或他们的 php 中的其他 ERB 标签或其他一些解决方案,允许他们编辑自己的内容并合并我的内容?

Erubis 是一个选择吗?

I have to work with another team that is developing in php, when I'm developinging ruby. Normally this isn't a problem, as they usually hand the source off to me to finish. There are multiple reasons why I prefer to deploy rails applications, and the PHP is a compromise at this point. I now not only have to deal with their php, but they've signed a contract to update the site.

I asked them if they knew if they were going to be doing content updates or code or both, and they aren't sure at this point.

What I would like to do is use .php.erb files to allow them to use their php, even though the code doesn't always follow best practices, it gets the job done. That way I'm only responsible for the parts I am and not maintaining anything I won't be paid for when they change the structure of the site.

Is it possible to allow them to use <%= render :partial => "form" %> or other ERB tags in their php or some other solution that allows them to edit their side of things and incorporate mine?

Is Erubis an option?

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

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

发布评论

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

评论(1

客…行舟 2024-10-08 12:01:47

您可以使用此 gem 在 .erb 模板中执行 require 'php'

You can do a require 'php' in your .erb template using this gem.

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