In the past, when setting the MediaWiki website, we put some common modifications in CommonSettings. php, and then LocalSettings. add the last line in php: require_once (usrlocalapache2htdocscommonCommonSettings. php), so that a series of websites can share CommonSettings. php File
In the past, when setting the MediaWiki website, we put some common modifications in CommonSettings. php, and then LocalSettings. add the last line in php: require_once ("/usr/local/apache2/htdocs/common/CommonSettings. php "), so that a series of websites can share CommonSettings. php File
In the past, when setting the MediaWiki website, we put some common modifications in CommonSettings. php, and then added the last line to LocalSettings. php:
require_once( "/usr/local/apache2/htdocs/common/CommonSettings.php" );
This allows a series of websites to share the settings in the CommonSettings. php file, which is simple and convenient. We have been using it all the time.
In the Drupal website. there are not many changes made in php, so I didn't set them as above, just in the settings of various sites. modify the content separately in php.
Recently, many websites in multiple languages need to go to settings. in php, It is very troublesome to modify the site name one by one, so you can call the unified common. php, and later modifications only need to be made in this file. This method is also very simple, in the settings of each station. add the last line of php:
require_once( "/var/www/html/example.com/sites/common.php" );
This common. php can contain various settings, judgments, and translations.
In our previous settings. php, we only added a statement to determine the mobile version. For example:
if (substr($path,0,3)=='/m/') $conf['theme_default'] = 'mobile';
You can copy this sentence to common. php and add more other setting statements. The original settings. php can be modified in batches. the linux shell statement example is as follows:
find /var/www/html/example.com/sites -maxdepth 2 -name 'settings.php' | xargs perl -pi -e 's|.*substr.*theme_default.*mobile.*|require_once( "/var/www/html/example.com/sites/common.php" );|g'
?
Free label:
Original article address: The settings. php file of the Drupal Series website contains a shared part. Thank you for sharing it with the original author.