PHP code example of sokil / php-upload

1. Go to this page and download the library: Download sokil/php-upload 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/ */

    

sokil / php-upload example snippets




$uploader = new \Sokil\Upload\Handler([
    'fieldName' => 'attachment',
]);
$uploader->moveLocal(__DIR__ . '/uploads/');



$filesystem = new \Gaufrette\Filesystem(new \Gaufrette\Adapter\Local(
    __DIR__ . '/attachments/'
));

$uploader = new \Sokil\Upload\Handler([
    'fieldName' => 'attachment',
]);
$uploader->move($filesystem);
javascript
{
    "hp-upload": "dev-master"
    }
}