Php 怪我的主机提供商和他们的服务器(或者Apache?)。公平地说,问题可能不在于SWFUpload(无论哪种方式,它仍然很不好),而在于flash在linux平台上的可用性。事实上,我们不知道出了什么问题,我希望我知道。 var swfu_settings
怪我的主机提供商和他们的服务器(或者Apache?)。公平地说,问题可能不在于SWFUpload(无论哪种方式,它仍然很不好),而在于flash在linux平台上的可用性。事实上,我们不知道出了什么问题,我希望我知道。Php 怪我的主机提供商和他们的服务器(或者Apache?)。公平地说,问题可能不在于SWFUpload(无论哪种方式,它仍然很不好),而在于flash在linux平台上的可用性。事实上,我们不知道出了什么问题,我希望我知道。 var swfu_settings ,php,linux,flash,file-upload,swfupload,Php,Linux,Flash,File Upload,Swfupload,怪我的主机提供商和他们的服务器(或者Apache?)。公平地说,问题可能不在于SWFUpload(无论哪种方式,它仍然很不好),而在于flash在linux平台上的可用性。事实上,我们不知道出了什么问题,我希望我知道。 var swfu_settings ={upload_url : "upload.php", flash_url : "flash/swfupload.swf", button_placeholder_id
var swfu_settings ={upload_url : "upload.php",
flash_url : "flash/swfupload.swf",
button_placeholder_id : "upload_flash",
file_size_limit : "2 MB",
file_types : "*.gif;*.jpg;*.png",
file_post_name : "Filedata",
file_queue_limit : 1,
post_params : {
"PHPSESSID" : getCookie()
},
upload_start_handler : upload_start,
upload_error_handler : upload_error,
upload_complete_handler : upload_complete,
upload_progress_handler : upload_progress,
file_queued_handler : file_queued,
button_disabled : false,
button_width : 120,
button_height : 22,
button_text : '<div class="adm_upload">Select image</div>',
button_text_style : '.adm_upload{color:#ff0000;}'
};
function manageUpload(){
if( isset($_FILES['Filedata']) ){
$dest_dir = $_SERVER[DOCUMENT_ROOT]."/images/products";
$destination = $_SERVER[DOCUMENT_ROOT]."/images/products/" . $_FILES['Filedata']['name'];
if( is_dir($dest_dir) ){
if( is_writable($dest_dir) ){
if( !move_uploaded_file($_FILES['Filedata']['tmp_name'], $destination ) ){
$html_body = '<h1>File upload error!</h1>';
switch ($_FILES['Filedata']['error']) {
case 1:
$html_body .= 'The file is bigger than this PHP installation allows';
break;
case 2:
$html_body .= 'The file is bigger than this form allows';
break;
case 3:
$html_body .= 'Only part of the file was uploaded';
break;
case 4:
$html_body .= 'No file was uploaded';
break;
default:
$html_body .= 'unknown errror';
}
echo ($html_body);
}
}
else{
echo "Says it's not writable: ".$dest_dir;
}
}
else{//not a directory?
echo "Says it's not a directory:".$dest_dir;
}
}
else{
echo "No file POSTED.\n";
}
}