【发布时间】:2018-06-28 12:55:18
【问题描述】:
<?php
$dir = 'uploads/';
if (isset($_REQUEST['image'])) {
$base = $_REQUEST['image'];
$current_timestamp = time();
$current_timestamp = (string)$current_timestamp;
$filename = $current_timestamp . '-' . basename($_REQUEST['filename']);
$binary = base64_decode($base);
header('Content-Type: bitmap; charset=utf-8');
$file = fopen($dir . $filename, 'wb');
fwrite($file, $binary);
fclose($file);
header('Content-Type: text/html');
echo $filename;
}
图片上传不工作
在圆形图像视图Android JSON PHP中上传和显示图像
【问题讨论】:
-
欢迎来到 SO!请查看 SO 的 how to ask 部分,因为我不确定您的真正要求是什么
-
它到底是怎么不工作的?实际结果是什么,您期望什么?以及如何上传?
-
@VladMatvienko 图像已上传,但我想在 android 中以圆形图像视图查看是否有任何编码
-
所以你基本上是想把ImageView圈起来吧?你试过搜索吗?
标签: php android image upload display