码迷,mamicode.com
首页 > Web开发 > 详细

file_get_content服务器对服务器二进制文件上传

时间:2018-11-22 12:30:09      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:acl   res   for   contents   file   安全   form   二进制文件   场景   

1、file_get_contents函数可安全用于二进制对象,适用服务器对服务器文件是上传场景

base64_encode(file_get_contents(‘1268879774AaCl4wIE.jpg‘, true))

需要做base64编码,必要情况下还需要用文件特定函数如图片,resize函数验证文件内容是否包含html/php等代码。

 

2、form表单multipart/form-data适用客户端对服务器文件上传

file_get_content服务器对服务器二进制文件上传

标签:acl   res   for   contents   file   安全   form   二进制文件   场景   

原文地址:https://www.cnblogs.com/hnhycnlc888/p/10000229.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!