Flash¿Í PHP¸¦ È°¿ëÇÏ¿© ¸ÖƼ ÆÄÀÏ ¾÷·Îµå ±¸ÇöÇÏ´Â ¹æ¹ý |
|
|
![](icon/private_name/1.gif) |
13³â Àü |
SWFUpload´Â ÀÚ¹Ù½ºÅ©¸³Æ®¿Í Ç÷¡½Ã¸¦ ÀÌ¿ëÇÏ¿© ¼Õ½±°Ô ´ÙÁß ÆÄÀÏ ¾÷·Îµå ÇÁ·Î±×·¡½º¹Ù¸¦ ±¸ÇöÇÏ´Â ¶óÀ̺귯¸®ÀÌ´Ù.
ÆäÀÌÁö ¸®·Îµå°¡ ¾ø°í, ¾÷·Îµå ½ÃÀÛÀü¿¡ ÆÄÀÏ »çÀÌÁ ¹Ì¸® ¾Ë ¼ö ÀÖÀ¸¸ç,
¾÷·Îµå Å¥¿¡¼ Ãß°¡/»èÁ¦, ÄÁÆ®·Ñ°ú ½ÃÇÁÆ® Å°¸¦ Á¶ÇÕÇÑ ´ÙÁß ÆÄÀÏ ¼±ÅÃ, ÀÚ¹Ù½ºÅ©¸³Æ® Äݹé À̺¥Æ® µîÀÌ °¡´ÉÇÏ´Ù.
¼Ò½ºÄڵ峪 ¹ÙÀ̳ʸ® ¸ðµâÀº http://swfupload.org
¿¡¼ ´Ù¿î ¹ÞÀ» ¼ö ÀÖ´Ù.
´ÙÀ½Àº ±× ±âº» Æ÷¸äÀÌ´Ù.
var swfu;
window.onload = function() {
swfu = new SWFUpload({
upload_script : "/upload.php?id=someid",
target : "SWFUploadTarget",
flash_path : "/jscripts/SWFUpload/SWFUpload.swf",
allowed_filesize : 30720, // 30 MB
allowed_filetypes : "*.*",
allowed_filetypes_description : "All files...",
browse_link_innerhtml : "Browse",
upload_link_innerhtml : "Upload queue",
browse_link_class : "swfuploadbtn browsebtn",
upload_link_class : "swfuploadbtn uploadbtn",
flash_loaded_callback : 'swfu.flashLoaded',
upload_file_queued_callback : "fileQueued",
upload_file_start_callback : 'uploadFileStart',
upload_progress_callback : 'uploadProgress',
upload_file_complete_callback : 'uploadFileComplete',
upload_file_cancel_callback : 'uploadFileCancelled',
upload_queue_complete_callback : 'uploadQueueComplete',
upload_error_callback : 'uploadError',
upload_cancel_callback : 'uploadCancel',
auto_upload : false
});
};
<?php
if (move_uploaded_file($_FILES['Filedata']['tmp_name'], "uploads/".$_FILES['Filedata']['name'])) {
return 'success';
} else {
die('Fail');
}
?>
|
|
̵̧ : 389 |
̵̧
¸ñ·Ï
|
|