PHP code example of icecave / temptation
1. Go to this page and download the library: Download icecave/temptation 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/ */
icecave / temptation example snippets
use Icecave\Temptation\Temptation;
// Use the temptation object to create files and directories ...
$temptation = new Temptation();
// Create a temporary file ...
$file = $temptation->createFile();
// Use the temporary file ...
file_put_contents($file->path(), 'This is my temp file.');
// Don't do anything else!
// The temporary file is automatically deleted when the $file object goes out of scope.