PHP code example of dmromanov / cakephp-tmpfile

1. Go to this page and download the library: Download dmromanov/cakephp-tmpfile 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/ */

    

dmromanov / cakephp-tmpfile example snippets


$tmpFile1 = new TmpFile();
$tmpFile2 = new TmpFile(
    'foo-',
    TMP . 'bar',
    0644
)
$tmpFile2->close();

// use as a regular CakePHP\Filesystem\File
$tmpfile->open()
$tmpfile->write($data);
$tmpfile->close();