SV: problem with 1.4.0

From: Date: Wed, 09 May 2001 09:47:03 +0000
Subject: SV: problem with 1.4.0
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-703@lists.php.net to get a copy of this message
Hi! Problem might be solved, but it feels strange that no-one reacted to this before and that I (a PHP-intermediate-programmer fixed it. Ok the thing that works for me is to change the 'a' enclosed in -*[]*- to a 'w': /*======================================================================*\ Function: _write_file() Purpose: write out a file \*======================================================================*/ [...] if (!($fd = fopen($filename, -*['a']*-))) { -------------------------------------^^^^^^^^^------------------- $this->_trigger_error_msg("problem writing '$filename.'"); return false; } // uncommented according to previuos advice by Monte // if (flock($fd, LOCK_EX) && ftruncate($fd, 0)) fwrite( $fd, $contents ); fclose($fd); chmod($filename,0644); // } return true; } Hope this helps someone with the same problem. a&l, tomas -----Ursprungligt meddelande----- Från: Tomas Sanchez Romani [mailto:tomas@altern.org] Skickat: den 9 maj 2001 11:28 Till: Smarty List Ämne: [smarty] problem with 1.4.0 Hi! I'm testing the example that comes bundled with smarty 1.4.0 and I'm having some trouble, first there was no output (fixed according to previous tip about smarty 1.4.0 and win32). Now everything was fine. Then I decided to change the standard dir-names to 'tpl' (templates) 'ctpl' (templates_c) and 'conf' (configs). There where no problems with 'tpl' and 'ctpl' but suddenly the configs where not found. Changed it back to 'configs' and they where fine again, but the final output now came out ten (10) times after each-other. Deleted the compiled templates and now it works fine. but for each reload of the document the new compiled template seems to append to the old, instead of replacing it. where did it go wrong? tomas --- You are currently subscribed to smarty as: tomas@altern.org To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

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