PHP code example of makasim / temp-file
1. Go to this page and download the library: Download makasim/temp-file library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
makasim / temp-file example snippets
//generate
$file = \Makasim\File\TempFile::generate();
//or create a temporary copy of persisted file
$file = \Makasim\File\TempFile::from('path_to_persisted_file');
//prevent file being removed
$file = \Makasim\File\TempFile::generate();
$file->persist();