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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)
