When PHP is disabled PHP function: Tempnam (), Tempnam () can create a temporary file name will not be repeated with the files in the same directory.
The return string is the created temporary file name. If an error occurs, pass the go home string.
While the Smarty run must compile the directory in a similar Templates_c setting, and then run it will automatically create a similar
43^43b^43b32f4b%%index.htm.php temporary file, so, Tempnam () is disabled, of course, can not automatically create a similar percent
43^43b^43b32f4b%%index.htm.php temporary files, naturally automatically create similar percent
43^43b^43b32f4b%%index.htm.php temporary file, is a blank.
The program that uses the Tempnam function in Smarty is internals/core.write_file.php, the following code:
PHP Code:-----------------------------------------------------------------------
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);
http://www.bkjia.com/PHPjc/445540.html www.bkjia.com true http://www.bkjia.com/PHPjc/445540.html techarticle when PHP is disabled PHP function: Tempnam (), Tempnam () can create a temporary file name will not be repeated with the files in the same directory. The return string is the created temporary file name. If there is an error ...