PHP code example of lliure / picup

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

    

lliure / picup example snippets


$picUp = new Picup('imagem'); //A string 'imagem' refere-se ao mesmo valor informado no index 'name'
$imagens = $picUp->upload('uploadTest/sub1');

$picUp = new Picup('imagem');
$imagens = $picUp->upload('uploadTest/sub1',  $picUp->cut(500, 500));

$picUp = new Picup('imagem');
$corte1 = $picUp->upload('uploadTest/sub1',  $picUp->cut(500, 500));
$corte2 = $picUp->upload('uploadTest/sub1/thumb',  $picUp->cut(100, 100));

 $_POST['label'] = $picUp->filterInput($_POST['label']);
 
txt
 $_POST['label'] = array(
    'new' => array(0 => 'lorem ipsum', 1 => 'dolor')
    'original' => array( 32 => 'teste 32', 33 => 'teste 33', 41 => 'teste 41')
 );