Create Temporary File Script

Create Temporary File Script is used to create a temporary file with unique name.

Demo :



Temporary File Name :  
       

Example :

In the above demo just you enter temporary file name at text box and then click create button now will be created temp file.if you would like to see that temp file at window machine go to start -> Run to type %temp% and then click ok button there is available temp file otherwise if you use linux machine go to /tmp directory and see that temp files.

Code :

Following code is use to Create Temporary File Script if you need code to copy and use to your website.


<?php
  $temp_name = 'temp_name';
  $filename = tempnam("/tmp",$temp_name);
  echo Temporary file [$filename] successfully created";
?>

In the above example $temp_name variable is used to assign for tmp name and tempnam() function is used to create a tmp file at operating system and which function two argument first one string directory and second one is string prefix. The string directory argument is used to pass for directory name and string prefix argument is used to add prefix for tmp file.

Free Download Script :

If you need to Create Temporary File Script click and download from following link.

Download




Content