Use write mode instead of append.

This commit is contained in:
andrey
2001-05-09 13:27:55 +00:00
parent 0ab86dc7c9
commit 2a7cb5ad14
2 changed files with 2 additions and 2 deletions

View File

@@ -772,7 +772,7 @@ class Smarty
if ($create_dirs) if ($create_dirs)
$this->_create_dir_structure(dirname($filename)); $this->_create_dir_structure(dirname($filename));
if (!($fd = fopen($filename, 'a'))) { if (!($fd = fopen($filename, 'w'))) {
$this->_trigger_error_msg("problem writing '$filename.'"); $this->_trigger_error_msg("problem writing '$filename.'");
return false; return false;
} }

View File

@@ -772,7 +772,7 @@ class Smarty
if ($create_dirs) if ($create_dirs)
$this->_create_dir_structure(dirname($filename)); $this->_create_dir_structure(dirname($filename));
if (!($fd = fopen($filename, 'a'))) { if (!($fd = fopen($filename, 'w'))) {
$this->_trigger_error_msg("problem writing '$filename.'"); $this->_trigger_error_msg("problem writing '$filename.'");
return false; return false;
} }