有誰知道如何使用PHP上傳圖片並調用UploadHandler.php?如何使用PHP調用UploadHandler.php - blueimp jQuery文件上傳
我不確定需要傳遞哪些信息以及以什麼格式。
這是我到目前爲止有:
$prop="test";
session_id($prop);
@session_start();
$url = 'http://christinewilson.ca/wp-content/uploads/2013/02/port_rhdefence.png';
$file_name[] = file_get_contents($url);
error_reporting(E_ALL | E_STRICT);
require('UploadHandler.php');
$upload_handler = new UploadHandler(array(
'user_dirs' => true
));
默認其設定' 'PARAM_NAME'=> '在類構建體files'',所以我想,預計'' –
由於I'我會更深入地研究這一點。當它發送「文件」時,你知道它實際發送了什麼嗎?它是否等同於PHP中的file_get_contents? –
不,它會填充你的'$ _FILES'數組和文件和信息的路徑。您可以像訪問其他數組一樣訪問它,例如:'$ _FILES ['files']'。退房http://www.php.net/manual/en/features.file-upload.post-method.php –