- Posts: 3
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<?php $config= array( 'basePath' => dirname(dirname(__FILE__)), 'runtimePath' => dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'runtime', 'name' => 'LimeSurvey', // All the actual config and the default for LS database ); $host=$_SERVER['HTTP_HOST']; if($host=='ls01.example.com'){ $config['components']['db']['connectionString']='mysql:host=localhost;port=3306;dbname=lime_ls1;'; }elseif($host=='ls02.example.com')){ $config['components']['db']['connectionString']='mysql:host=localhost;port=3306;dbname=lime_ls2;'; }elseif($host=='ls03.example.com')) $config['components']['db']['connectionString']='mysql:host=localhost;port=3306;dbname=lime_ls3;'; }