示例#1
0
 private function createConfigFile($file, $settings)
 {
     $config = '<?php' . "\n";
     $config = $config . 'return ';
     $config = $config . Util::convertArrayToString($settings, '');
     $config = $config . ';' . "\n";
     file_put_contents($file, $config);
 }
示例#2
0
 private function createConfigFile($file, $settings)
 {
     $config = '<?php' . "\n";
     $config = $config . 'return ';
     $config = $config . \app\lib\Util::convertArrayToString($settings, '');
     $config = $config . ';' . "\n";
     $fp = fopen($file, "w");
     fwrite($fp, $config);
     fclose($fp);
 }
 private function createConfigFile($settings)
 {
     $settings = self::getCacheInfo($settings);
     $settings['footer_links'] = self::getFootLinks($settings['footer_links']);
     $config = '<?php' . "\n";
     $config = $config . 'return [' . "\n";
     $config = $config . '  \'settings\' => ';
     $config = $config . Util::convertArrayToString($settings, '  ') . "\n";
     $config = $config . '];' . "\n";
     file_put_contents(Yii::getAlias('@app/config/params.php'), $config);
 }