• <small id='kjrym'></small><noframes id='kjrym'>

  • <i id='kjrym'><tr id='kjrym'><dt id='kjrym'><q id='kjrym'><span id='kjrym'><b id='kjrym'><form id='kjrym'><ins id='kjrym'></ins><ul id='kjrym'></ul><sub id='kjrym'></sub></form><legend id='kjrym'></legend><bdo id='kjrym'><pre id='kjrym'><center id='kjrym'></center></pre></bdo></b><th id='kjrym'></th></span></q></dt></tr></i><div id='kjrym'><tfoot id='kjrym'></tfoot><dl id='kjrym'><fieldset id='kjrym'></fieldset></dl></div>

      <tfoot id='kjrym'></tfoot>
        <bdo id='kjrym'></bdo><ul id='kjrym'></ul>
      <legend id='kjrym'><style id='kjrym'><dir id='kjrym'><q id='kjrym'></q></dir></style></legend>

      1. Drush 9 别名文件应该在 Drupal 8 中的什么位置?

        Where Drush 9 aliases file should be located in Drupal 8?(Drush 9 别名文件应该在 Drupal 8 中的什么位置?)
          <tbody id='WxDWi'></tbody>

        <small id='WxDWi'></small><noframes id='WxDWi'>

      2. <legend id='WxDWi'><style id='WxDWi'><dir id='WxDWi'><q id='WxDWi'></q></dir></style></legend>

          <bdo id='WxDWi'></bdo><ul id='WxDWi'></ul>

                <tfoot id='WxDWi'></tfoot>

                • <i id='WxDWi'><tr id='WxDWi'><dt id='WxDWi'><q id='WxDWi'><span id='WxDWi'><b id='WxDWi'><form id='WxDWi'><ins id='WxDWi'></ins><ul id='WxDWi'></ul><sub id='WxDWi'></sub></form><legend id='WxDWi'></legend><bdo id='WxDWi'><pre id='WxDWi'><center id='WxDWi'></center></pre></bdo></b><th id='WxDWi'></th></span></q></dt></tr></i><div id='WxDWi'><tfoot id='WxDWi'></tfoot><dl id='WxDWi'><fieldset id='WxDWi'></fieldset></dl></div>
                  本文介绍了Drush 9 别名文件应该在 Drupal 8 中的什么位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试了一些方法来为我的本地 Drupal 项目创建别名,我指的是:https://www.drupal.org/node/1401522
                  https://www.drupal.org/project/drush/issues/831272
                  https://www.drupal.org/project/drush/issues/786766

                  I have tried some ways to create an alias for my local Drupal project, I'm referring to : https://www.drupal.org/node/1401522
                  https://www.drupal.org/project/drush/issues/831272
                  https://www.drupal.org/project/drush/issues/786766

                  我可以通过运行这个命令来连接:

                  I can connect by running this command :

                  drush --root=C:/wamp64/www/executive-coatings --uri=http://localhost:81/executive-coatings status
                  

                  输出:

                   Drupal version   : 8.6.13
                   Site URI         : http://localhost:81/executive-coatings
                   DB driver        : mysql
                   DB hostname      : localhost
                   DB port          : 3306
                   DB username      : root
                   DB name          : dev_ecc_new
                   Database         : Connected
                   Drupal bootstrap : Successful
                   Default theme    : ecc_front
                   Admin theme      : adminimal_theme
                   PHP binary       : C:wamp64inphpphp7.2.10php.exe
                   PHP config       : C:wamp64inphpphp7.2.10php.ini
                   PHP OS           : WINNT
                   Drush script     : C:wamp64wwwexecutive-coatingsvendorindrush.phar
                   Drush version    : 9.6.2
                   Drush temp       : C:UserskAppDataLocalTemp
                   Drush configs    : C:/Users/k/.drush/drush.yml
                                      C:/wamp64/www/executive-coatings/vendor/drush/drush/drush.yml
                   Install profile  : minimal
                   Drupal root      : C:wamp64wwwexecutive-coatings
                   Site path        : sites/default
                   Files, Public    : sites/default/files
                   Files, Temp      : /tmp
                  

                  但是当我尝试使用 drush 别名时,它不起作用.这是我的别名文件:

                  But when I try to use a drush alias it doesn't work. Here my alias file :

                  $aliases['local'] = array(
                        'uri' => 'localhost:81/executive-coatings',
                        'root' => 'C:/wamp64/www/executive-coatings',
                    'path-aliases' => array(
                      '%dump-dir' => '/tmp',
                    ),
                  );
                  

                  运行 drush @local status 返回 [preflight] 找不到别名 @local.

                  我想我把别名文件放在了错误的目录中,你能提供正确的路径吗?

                  I think I put my alias file in the wrong directory, can you provide the correct path ?

                  推荐答案

                  Alias 文件位置在这里不是您唯一的问题,因为您运行的是 Drush 9.x.这里是 Drush 8.x 和 Drush 9.x 之间关于别名的主要变化:

                  Alias file location is not your only issue here, because you are running Drush 9.x. Here the major changes between Drush 8.x and Drush 9.x regarding aliases :

                  • 站点别名不再是 PHP 文件而是 YAML 文件.希望 Drush 9.x 带有一个命令来转换你旧的 drush 8 别名:

                  • Site aliases are no longer PHP files but YAML files. Hopefully Drush 9.x comes with a command to convert your old drush 8 aliases :

                  drush site:alias-convert
                  

                • 默认情况下不再解析 Drush 8 中使用的用户别名位置(~/.drush/sites/etc/drush/sites),但是你可以在你的 ~/.drush/drush.yml 配置文件中注册任何可以放置别名文件的位置.可以通过运行以下命令自动设置旧的 Drush 8 路径:

                • The user alias locations used in Drush 8 (~/.drush/sites, /etc/drush/sites) are by default no longer parsed, but you can register any location where alias files may be placed in your ~/.drush/drush.yml configuration file. Setting the old Drush 8 paths can be done automatically by running :

                  drush core:init
                  

                  它将以下内容写入 ~/.drush/drush.yml :

                  It writes the following to ~/.drush/drush.yml :

                  drush:
                    paths:
                      alias-path:
                        - '${env.home}/.drush/sites'
                        - /etc/drush/sites
                  

                  例如在您的情况下,可以在文件中完成为网站 executive-coatings 别名 ecc 定义一个本地环境(提供此位置已按上述方式注册)~/.drush/sites/ecc.site.yml.

                  For example in your case, defining a local environment for the website executive-coatings aliased ecc may be done in the file (provided this location is registered as mentioned above) ~/.drush/sites/ecc.site.yml.

                  您还可以在以下位置(在该网站的项目根目录下,使用 self 在文件命名中):

                  You can also define environment aliases (eg. @dev, @preprod, etc.) for a given website at the following location (under the project root of that website, using self in the file naming) :

                  <DRUPAL_ROOT>/drush/sites/self.site.yml
                  

                • 有用的链接:
                  - https://github.com/drush-ops/drush/blob/master/examples/example.site.yml
                  - https://github.com/consolidation/site-alias

                  这篇关于Drush 9 别名文件应该在 Drupal 8 中的什么位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                      <small id='XEZF6'></small><noframes id='XEZF6'>

                      • <legend id='XEZF6'><style id='XEZF6'><dir id='XEZF6'><q id='XEZF6'></q></dir></style></legend>
                            <bdo id='XEZF6'></bdo><ul id='XEZF6'></ul>
                              <tbody id='XEZF6'></tbody>

                            <tfoot id='XEZF6'></tfoot>
                          • <i id='XEZF6'><tr id='XEZF6'><dt id='XEZF6'><q id='XEZF6'><span id='XEZF6'><b id='XEZF6'><form id='XEZF6'><ins id='XEZF6'></ins><ul id='XEZF6'></ul><sub id='XEZF6'></sub></form><legend id='XEZF6'></legend><bdo id='XEZF6'><pre id='XEZF6'><center id='XEZF6'></center></pre></bdo></b><th id='XEZF6'></th></span></q></dt></tr></i><div id='XEZF6'><tfoot id='XEZF6'></tfoot><dl id='XEZF6'><fieldset id='XEZF6'></fieldset></dl></div>