开发者

using install_drupal function to install a new drupal

开发者 https://www.devze.com 2023-03-01 02:11 出处:网络
I want to use install_drupal() function to install a new drupal in sites/[site_name]. in install_drupal() funct开发者_C百科ion there is not any variable(or at least I haven\'t seen) to indicate the si

I want to use install_drupal() function to install a new drupal in sites/[site_name]. in install_drupal() funct开发者_C百科ion 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,


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号