传回字串就是建立的临时档名。若发生错误则传回空字串。
43^43B^43B32F4B%%index.htm.php的临时档,所以,tempnam()被禁用后,当然不能自动创建类似%%
43^43B^43B32F4B%%index.htm.php的临时档,自然自动创建类似%%
smarty中使用tempnam函数的程序是internals/core.write_file.php,如下代码:
PHP代码:// write to tmp file, then rename it to avoid // file locking race condition $_tmp_file = tempnam($_dirname, 'wrt'); if (!($fd = @fopen($_tmp_file, 'wb'))) { $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt'); if (!($fd = @fopen($_tmp_file, 'wb'))) { $smarty->trigger_error("problem writing temporary file '$_tmp_file'"); return false; } } fwrite($fd, $params['contents']); fclose($fd);










