onethink 文件上传问题解决
作者:小鱼的互联网观察 发布时间:March 11, 2017 分类:互联网观察
onethink后台文件上传 成功后返回的是 加密字符串。
使用onethink内置解密函数可以解密
echo think_decrypt(I('file'));
可以看到解密后的数据就是文件上传成功后onethink_file 存储的数据,
{"id":"4","name":"123.txt","savename":"58c2b9eda7708.txt","savepath":"2017-03-10\/","ext":"txt","mime":"application\/octet-stream","size":"61626","md5":"fd95c2c6a71affe07c2b8c23b1ca9f24","sha1":"2086cd85ea61400b5522be83b61af3179b379ed3","location":"0","url":"","create_time":"1489156589","path":"\/Uploads\/Download\/2017-03-10\/58c2b9eda7708.txt"}
根据此ID 就可以 去 onethink_file 找到这个文件的地址了。。
ok !