使用 install_drupal 函数安装新的 drupal
我想使用 install_drupal() 函数在站点/[site_name] 中安装新的 drupal。 在 install_drupal() 函数中没有任何变量(或者至少我没有看到)来指示要安装的站点路径。
现在,如果我的站点文件夹中有 3 个文件夹(sites/site_1、sites/site_2、sites_3),我该如何说安装 site_2? Drupal 版本是 7。
谢谢,
I want to use install_drupal() function to install a new drupal in sites/[site_name].
in install_drupal() function there is not any variable(or at least I haven't seen) to indicate the site path to install.
Now if I have 3 folders in my sites folder(sites/site_1, sites/site_2, sites_3) How can I say install site_2?
Drupal version is 7.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信你能以这种方式使用这个功能。
install_drupal($settings = array( ))
接受设置数组,但我在文档中没有看到任何建议您可以设置站点名称的内容。要安装新的 Drupal 站点,您必须创建站点文件夹 + settings.php 文件,然后导航到 http: //yourdomain.com/sitename.install.php 或 http://subdomain.yourdomain.com /install.php。
一旦您拥有站点文件夹和settings.php,您就可以以编程方式运行
install_drupal()
(使用drush——不太确定,因为我从未尝试过)。检查文档以了解您必须在$settings
变量中提供哪些信息。I don't believe you can use this function in this way.
install_drupal($settings = array())
accepts a settings array but I don't see anything in the documentation that suggests you can set the site name.To install a new Drupal site, you have to create your site folder + your settings.php file then navigate to http://yourdomain.com/sitename.install.php OR http://subdomain.yourdomain.com/install.php.
You may be able to run
install_drupal()
programmatically (using drush -- not too sure as I've never tried this) once you have you already have your site folder and settings.php. Check the documentation to see what information you would have to provide in the$settings
variable.