\n in configs files

From: Date: Mon, 29 Jul 2002 03:46:09 +0000
Subject: \n in configs files
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5490@lists.php.net to get a copy of this message
If you want to use "\n" for new line in configs files change Config_File.class.php in function _parse_config_block() change foreach ($config_lines as $line) { if (preg_match("/^\s*(\.?\w+)\s*=(.*)/", $line, $match)) { $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', trim($match[2])); $this->_set_config_var($vars, trim($match[1]), $var_value, $this->booleanize); } } to foreach ($config_lines as $line) { if (preg_match("/^\s*(\.?\w+)\s*=(.*)/", $line, $match)) { $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', trim($match[2])); $var_value = str_replace('\n',"\n",$var_value); $this->_set_config_var($vars, trim($match[1]), $var_value, $this->booleanize); } } PS: i'm sure there is better solution for that:-) Peter

« previous php.smarty.general (#5490) next »