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
));