uploadify
http://www.uploadify.com/demo/
<body>
<input type="file" name="fileInput" id="fileInput" />
<script type="text/javascript">
$(document).ready(function() {
$('#fileInput').fileUpload ({
'uploader' : 'uploader.swf',
'script' : 'upload.php',
'cancelImg' : 'cancel.png',
'auto' : true,
'folder' : '/uploads'
});
});
</script>
</body>
phpで受け取るとき
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
// Uncomment the following line if you want to make the directory if it doesn't exist
// mkdir(str_replace('//','/',$targetPath), 0755, true);
move_uploaded_file($tempFile,$targetFile);
}
http://ameblo.jp/linking/entry-10305015696.html
[コメントが多かった順の記事]
・人の心理の裏をかくホームページ集客術:リピータになってもらうためには(233)
・ホームページ心理学第2弾「メールの書きだしとホームページ運営・集客の関係」(76)
・娘が生まれた(69)
・ゲームと言えば、何を思い出す? (50)
・Microsoftからアクセス (30)
・「目標の立て方」と「努力」と「実行力」(26)
最近のコメント