mini ajax 上传
来源:互联网 发布:java显示 隐式 编辑:程序博客网 时间:2024/04/28 02:32
本例用了很多的js文件
到演示页面可以查看源码或者存储
演示
XML/HTML Code
- <form id="upload" method="post" action="upload.php" enctype="multipart/form-data">
- <div id="drop">
- Drop Here
- <a>Browse</a>
- <input type="file" name="upl" multiple />
- </div>
- <ul>
- <!-- The file uploads will be shown here -->
- </ul>
- </form>
PHP Code
- <?php
- // A list of permitted file extensions
- $allowed = array('png', 'jpg', 'gif','zip');
- if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){
- $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);
- if(!in_array(strtolower($extension), $allowed)){
- echo '{"status":"error"}';
- exit;
- }
- if(move_uploaded_file($_FILES['upl']['tmp_name'], '../upload/'.$_FILES['upl']['name'])){
- echo '{"status":"success"}';
- exit;
- }
- }
- echo '{"status":"error"}';
- exit;
- ?>
原文地址:http://www.freejs.net/article_biaodan_78.html
- mini ajax 上传
- Ajax示例mini
- javaWeb日常开发之ajax,mini.open,mini.confirm
- ajax上传
- ajax上传
- ajax 上传
- ajax 上传
- mini
- 发布一个超级mini的ajax源代码(含简单框架)
- Ajax上传文件 (JQuery Ajax&原生Ajax)
- ajax上传文件
- 模仿AJAX上传文件
- ajax文件上传
- ajax文件上传应用
- ajax 文件上传进度条
- jQuery AJAX 文件上传
- C#+ajax上传文件
- LINUX + AJAX上传数据
- 水平集函数演化方程的推导细节
- cURL常用的几个PHP函数(转)
- pathon 3 自学基础
- 摆地摊经验总结
- curl编程实例——模拟登陆
- mini ajax 上传
- 好的博客转载
- JPA 映射时间(Temporal)类型@Temporal
- Auto Layout on iOS Version prior to 6.0
- curl编程实例——文件下载
- linux驱动子系统--PCI
- synchronized互斥锁-单例内
- 引用 Ireport开发技巧
- 优化程序之——宏与内联函数