0

我已经访问了很多关于这个的文章,但是从 1 周开始搜索整个互联网并没有得到任何线索。它在 xampp 服务器上工作正常,但在在线服务器上却没有,这就是为什么我很困惑我没有对插件进行很多更改仅在 index.php 和 UploadHandler.php 中的一些更改,否则每件事都是一样的,它显示旧照片来自文件夹创建没有新文件夹这里是 index.php

require('UploadHandler.php');
define("HTTP_SERVER", "/main");
session_start();
$userid = $_SESSION['uni'];

$options = array('upload_dir' =>'files'.$userid.'/', 'upload_url'=> HTTP_SERVER . "/server/php/" . 'files'.$userid.'/');
$upload_handler = new UploadHandler($options);

这是我的 uploadhandler.php 更改

class UploadHandler
{
//added the $options here
    protected $options;

    protected $error_messages = array(
        1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
        2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
        3 => 'The uploaded file was only partially uploaded',

查看整个插件访问:https ://github.com/blueimp/jQuery-File-Upload

任何帮助或建议将不胜感激。如果有人看到此回复,请提前致谢。

4

0 回答 0