using install_drupal function to install a new drupal
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.
精彩评论