Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6251

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns directory path used for temporary files</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.set-time-limit.html">set_time_limit</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.version-compare.html">version_compare</a></div>
 <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.sys-get-temp-dir" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">sys_get_temp_dir</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.1)</p><p class="refpurpose"><span class="refname">sys_get_temp_dir</span> &mdash; <span class="dc-title">Returns directory path used for temporary files</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.sys-get-temp-dir-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>sys_get_temp_dir</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Returns the path of the directory PHP stores temporary files in by
   default.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sys-get-temp-dir-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the path of the temporary directory.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.sys-get-temp-dir-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-522">
    <p><strong>Example #1  <span class="function"><strong>sys_get_temp_dir()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Create&nbsp;a&nbsp;temporary&nbsp;file&nbsp;in&nbsp;the&nbsp;temporary&nbsp;<br />//&nbsp;files&nbsp;directory&nbsp;using&nbsp;sys_get_temp_dir()<br /></span><span style="color: #0000BB">$temp_file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">tempnam</span><span style="color: #007700">(</span><span style="color: #0000BB">sys_get_temp_dir</span><span style="color: #007700">(),&nbsp;</span><span style="color: #DD0000">'Tux'</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #0000BB">$temp_file</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
C:\Windows\Temp\TuxA318.tmp
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.sys-get-temp-dir-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.tmpfile.html" class="function" rel="rdfs-seeAlso">tmpfile()</a> - Creates a temporary file</span></li>
    <li class="member"> <span class="function"><a href="function.tempnam.html" class="function" rel="rdfs-seeAlso">tempnam()</a> - Create file with unique file name</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.set-time-limit.html">set_time_limit</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.version-compare.html">version_compare</a></div>
 <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>