Created
June 16, 2010 17:03
-
-
Save fivestar/440962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>wozozo...</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> | |
<script type="text/javascript" src="jquery.upload.js"></script> | |
<style> | |
<!-- | |
--> | |
</style> | |
</head> | |
<body> | |
<div id="box"> | |
<input type="file" name="photo" id="photo" /> | |
</div> | |
<div id="result"> | |
</div> | |
<script> | |
//<![CDATA[ | |
jQuery(document).ready(function($) { | |
$('#photo').change(function(event) { | |
$(this).upload('/wozozo/up/up.php', function(files) { | |
var text = ''; | |
for (var name in files) { | |
text += '[' +name + "]<br />"; | |
for (var key in files[name]) { | |
text += key + ': ' + files[name][key] + "<br />"; | |
} | |
} | |
$('#result').html(text); | |
}, 'json'); | |
}); | |
}); | |
//]]> | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo json_encode($_FILES) ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment