如何从代码运行 drush 命令
我想从 Drupal 功能触发 Drush 命令,有人对如何最好地做到这一点有任何建议吗?
I'd like to trigger a Drush command from a Drupal function, anyone have any suggestions for how best to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些 drush 命令只是调用标准 Drupal 功能,因此您可以挖掘并找到该函数并调用它。如果您有特定的命令,请询问,我相信有人会提供帮助。
drush 所做的一些其他事情,例如下载模块,可能最好保留在那里,因为它们是高级管理功能。您想要实现的最终目标是什么?
Some drush commands are just making calls to standard Drupal functionality, so you could dig and find that function and call it. If you have a specific command, ask and I am sure someone will help.
Some of the other things drush does, like downloading modules, are probably best left there, as they are high level administrative functions. What is the end goal you are trying to achieve?