Help: Smarty Templates/Boss needs answer tommorow :/
Moderator: General Moderators
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
Ok, will do.. Ok, i am at work now, and the setting of permissions seems to have solved most of my agony. Besides one little thing of not being able to update my header.tpl, i can fully make use of the templating system now it seems.
Although with being able to use the templates, I have run into another interesting occurance. Now, whenever I update a template. I will load it in explorer, and get this error:

But with a refresh it is gone, and the page is fine. My boss was wondering why we get error on first occorance of load, and if whenenver any template is updated we will have to see an error on first load.
Although with being able to use the templates, I have run into another interesting occurance. Now, whenever I update a template. I will load it in explorer, and get this error:

But with a refresh it is gone, and the page is fine. My boss was wondering why we get error on first occorance of load, and if whenenver any template is updated we will have to see an error on first load.
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
I see, its trying to change it here:
function _write_file($filename, $contents, $create_dirs = false)
{
if ($create_dirs)
$this->_create_dir_structure(dirname($filename));
if (!($fd = @fopen($filename, 'w'))) {
$this->trigger_error("problem writing '$filename.'");
return false;
}
// flock doesn't seem to work on several windows platforms (98, NT4, NT5, ?),
// so we'll not use it at all in windows.
if ( strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' || (flock($fd, LOCK_EX)) ) {
fwrite( $fd, $contents );
fclose($fd);
chmod($filename, 0644); <!--- Right here-- --->
}
return true;
}
How do I stop this?
function _write_file($filename, $contents, $create_dirs = false)
{
if ($create_dirs)
$this->_create_dir_structure(dirname($filename));
if (!($fd = @fopen($filename, 'w'))) {
$this->trigger_error("problem writing '$filename.'");
return false;
}
// flock doesn't seem to work on several windows platforms (98, NT4, NT5, ?),
// so we'll not use it at all in windows.
if ( strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' || (flock($fd, LOCK_EX)) ) {
fwrite( $fd, $contents );
fclose($fd);
chmod($filename, 0644); <!--- Right here-- --->
}
return true;
}
How do I stop this?
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
LOL no i shouldn't comment it out though should I? Its a function, so obviously it is getting called from somewherre...../
Ignore, i already commented it out lol
Ignore, i already commented it out lol
Last edited by NewfieBilko on Mon Jun 07, 2004 8:31 am, edited 1 time in total.
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
and here is the refering code:
Last edited by NewfieBilko on Mon Jun 07, 2004 8:50 am, edited 1 time in total.
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:



