0
不知道你们是否可以协助这与jQuery文件上传代码有关。 我想通过一个值来为我的上传文件创建一个文件夹名称。 基本上,在include中执行查询,并将数值返回给变量$ leaseId_file。 - $ leaseId_file变量成为文件夹名称。 这部分工作正常。该文件夹被创建并且文件被保存到该目录。 但是,刷新页面时上载的文件未列出。 以下是我在文件php/.index.php中使用的代码 - 任何帮助都很棒.-谢谢。jQuery文件上传
error_reporting(E_ALL | E_STRICT);
include_once('../../../_includes/get_leaseId_files.php'); // All this does is returns a value for $leaseId_file. This is the value I want for the directory.
require('upload.class.php');
class CustomUploadHandler extends UploadHandler {
protected function get_user_id() {
global $leaseId_file;
return $leaseId_file;
}
}
$upload_handler = new CustomUploadHandler(array(
'user_dirs' => true
));