路径没有问题,我确认过了,而且是用的绝对路径。 我把smarty的core.write_file.php改了,现在好了,不知道为什么会有这个问题。 修改前: if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) { // On platforms and filesystems that cannot overwrite with rename() // delete the file before renaming it -- because windows always suffers // this, it is short-circuited to avoid the initial rename() attempt @unlink($params['filename']); @rename($_tmp_file, $params['filename']); } 修改后: if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) { // On platforms and filesystems that cannot overwrite with rename() // delete the file before renaming it -- because windows always suffers // this, it is short-circuited to avoid the initial rename() attempt if(file_exists($params['filename'])) { @unlink($params['filename']); } @rename($_tmp_file, $params['filename']); }
我把smarty的core.write_file.php改了,现在好了,不知道为什么会有这个问题。
修改前:
if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
// On platforms and filesystems that cannot overwrite with rename()
// delete the file before renaming it -- because windows always suffers
// this, it is short-circuited to avoid the initial rename() attempt
@unlink($params['filename']);
@rename($_tmp_file, $params['filename']);
}
修改后:
if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
// On platforms and filesystems that cannot overwrite with rename()
// delete the file before renaming it -- because windows always suffers
// this, it is short-circuited to avoid the initial rename() attempt
if(file_exists($params['filename'])) {
@unlink($params['filename']);
}
@rename($_tmp_file, $params['filename']);
}