PHP code example of sandyandi / test-uploadedfile-factory

1. Go to this page and download the library: Download sandyandi/test-uploadedfile-factory 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/ */

    

sandyandi / test-uploadedfile-factory example snippets


use Sandyandi\TestUploadedFileFactory\TestUploadedFileFactory;

$testUploadedFileFactory = new TestUploadedFileFactory;

$workDir = 'path/to/your/work/dir';
$testUploadedFileFactory = new TestUploadedFileFactory($workDir);

$pathToFile = 'path/to/your/file';
$uploadedFile = $testUploadedFileFactory->create($pathTofile);