PHP code example of alex-net / tiny-file-man

1. Go to this page and download the library: Download alex-net/tiny-file-man 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/ */

    

alex-net / tiny-file-man example snippets


$config = 

    global $lang_vars; 

    # таким образом мы расширим путь до корня ftp ... 
    if ($ftp && !empty($config['ftp_base_folder']) && $path) {
        $path = DIRECTORY_SEPARATOR . $config['ftp_base_folder'] . $path;
    }

        if (!in_array($file, $filesThumbs)) {
        	$creation_thumb_path = '/' . $config['ftp_base_folder'] . $config['ftp_thumbs_dir'] . $subdir . $file;
            if (!create_img($src, $creation_thumb_path, 122, 91, 'crop', $config,$ftp)) { 
                $src_thumb = $mini_src = "";
            }
        }

    if (empty($this->options['ftp'])) {
        rename($uploaded_file, $file_path);
    } else {
        $fn = $this->options['storeFolder'] . fix_filename(basename($file_path), $this->options['config']);
        $this->options['ftp']->put($fn, $uploaded_file, FTP_BINARY);
    }