Esempio n. 1
0
<?php

use PhpSolutions\File\Upload;
// set the maximum upload size in bytes
$max = 600 * 1024;
// 600 KB
if (isset($_POST['upload'])) {
    // define the path to the upload folder
    $destination = $_SERVER['DOCUMENT_ROOT'] . "/2t/2601983359/VefRemi/Gallery/";
    require_once '/PhpSolutions/File/Upload.php';
    try {
        $loader = new Upload($destination);
        $loader->setMaxSize($max);
        $loader->allowAllTypes();
        $loader->upload();
        $result = $loader->getMessages();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}
?>
<!DOCTYPE HTML>
<html>
<head>
    <meta  charset="utf-8">
    <title>Upload File</title>
</head>

<body>
<?php 
if (isset($result)) {
Esempio n. 2
0
        break;
      default:
        $meetingfee="";
    } 
*/
// set the maximum upload size in bytes
use PhpSolutions\File\Upload;
// set the maximum upload size in bytes
$max = 60000 * 1024;
// 60 MB
if (isset($_FILES['uploadFile'])) {
    // define the path to the upload folder
    $destinationFile = 'uploads/file/';
    try {
        $loaderFile = new Upload($destinationFile, 'uploadFile');
        $loaderFile->setMaxSize($max);
        $loaderFile->allowAllTypes();
        $loaderFile->upload();
        $uploadFile1 = $loaderFile->getName();
        $resultFile = $loaderFile->getMessages();
        $_SESSION['uploadFile'] = $uploadFile1;
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    if (!empty($uploadFile1)) {
        $uploadsFile = $destinationFile . $uploadFile1;
    } else {
        $uploadsFile = "";
    }
}
/*if (isset($_FILES['uploadBill'])) {