tempnam() function in PHP

王林
Release: 2023-09-20 20:38:02
forward
1768 people have browsed it

tempnam() function in PHP

The tempnam() function creates a temporary file with a unique file name.

grammar

tempnam(dir, prefix)
Copy after login

parameter

  • dir - The directory where temporary files will be created.

  • Prefix - Beginning of file

return

tempnam() function returns the new temporary file name, or FALSE on failure.

Example

<?php
   echo tempnam("C:\test</p><p>ew","TMP");
?>
Copy after login

Output

C:\test</p><p>ew\TMP1.tmp
Copy after login

The above is the detailed content of tempnam() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!