PHP code example of denisyukphp / tmpfile-manager
1. Go to this page and download the library: Download denisyukphp/tmpfile-manager 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/ */
denisyukphp / tmpfile-manager example snippets
use TmpFileManager\TmpFileManagerBuilder;
use TmpFile\TmpFileInterface;
$tmpFileManager = (new TmpFileManagerBuilder())
->withTmpFileDir(sys_get_temp_dir())
->withTmpFilePrefix('php')
->build()
;
/** @var TmpFileInterface $tmpFile */
$tmpFile = $tmpFileManager->create();