|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
quocbao Smarty Rookie
Joined: 30 Aug 2004 Posts: 8
|
Posted: Mon Aug 30, 2004 6:46 am Post subject: Ok , i got it guy . I make Smarty work :) |
|
|
Well , finally , after 15 minutes viewing the source , i think i solved the problem :
this is how smarty working (am i right ? )
Smarty parses data and create a tempory compiled script in temp folder and then it changes the modification time of this file and then move it to compile dir . In windows , it will create a file in Temp folder , and change the modofication time , but by somehow , after changing , windows will automaticaly delete this file (maybe this is Smarty error , duno ) .
HOW TO FIX ?
Very simple , instead of changing the modification time of tempory file , i'll change the modification time of compiled file (changing after rename , not before) .
Here is the detail
Open core/core.write_file.php
find and comment (or remove it if yu want)
Code: |
if (isset($params['timestamp'])) {
touch($_tmp_file, $params['timestamp']);
}
|
and then
find
Code: |
@chmod($params['filename'], $smarty->_file_perms);
|
and add after
Code: |
if (isset($params['timestamp'])) {
touch($params['filename'], $params['timestamp']);
}
|
The same effect , but no error at all . Long live Smarty |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|