PHP code example of guillermomartinez / filemanager-php
1. Go to this page and download the library: Download guillermomartinez/filemanager-php 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/ */
guillermomartinez / filemanager-php example snippets
composer
uillermoMartinez\Filemanager\Filemanager;
// Add your own authentication method
//if(!isset($_SESSION['username']) || $_SESSION['username']!="")
// exit();
$extra = array(
// path after of root folder
// if /var/www/public_html is your document root web server
// then source= usefiles o filemanager/usefiles
"source" => "userfiles",
// url domain
// so that the files and show well http://php-filemanager.rhcloud.com/userfiles/imagen.jpg
// o http://php-filemanager.rhcloud.com/filemanager/userfiles/imagen.jpg
"url" => "http://php-filemanager.rhcloud.com/",
"debug" => false,
"images" => [
'resize'=>[
// width,height,IF TRUE crop in width ELSEIF NULL is auto,IF TRUE crop in height ELSEIF NULL is auto
'medium' => array(340,180,true,true),
'large' => array(1024,768,true,true),
]
],
);
if(isset($_POST['typeFile']) && $_POST['typeFile']=='images'){
$extra['type_file'] = 'images';
}
$f = new Filemanager($extra);
$f->run();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.