Mega Code Archive

 
Categories / Php / File Directory
 

Creating a temporary file in a particular place

<?php $dir = dirname($existing_file); $temp = tempnam($dir,'temp'); $temp_fh = fopen($temp,'w'); ?>