二进制-html表单上传file,php获取然后保存到数据库中,类型blob
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:33:31
Original
2002 people have browsed it
二进制php表单上传
<code><form action="../php/teest.php" method="post"> <input type="file" name="pic"> <input type="submit" value="提交"> </form> php: require_once('mysql_helper.php');$pic = $_POST['pic'];$path = './Users/e-bag4/Desktop'. $_FILES['pic']['name'];if (move_uploaded_file($_FILES['pic']['tmp_name'],$path)) { $sql="insert into e_user(pic)values('$path')"; if(execute_data($sql)){ echo "上传成功!!"; }else{ echo "文件上传失败!!"; }} 我想问一下我这代码中需要怎么改进一下</code>
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11