|
|
@@ -20,6 +20,7 @@ class UploadController extends BaseController
|
|
|
header('Content-type:text/html;charset=utf-8');
|
|
|
$base64 = file_get_contents('php://input');
|
|
|
$base64_image_content = str_replace("content=", "", urldecode($base64));
|
|
|
+ Yii::info($base64_image_content);
|
|
|
//匹配出图片的格式
|
|
|
if (preg_match('/^(data:\s*image\/(\w+);base64,)/', $base64_image_content, $result)) {
|
|
|
$type = $result[2];
|