Commit 46f46950b5ba4f29923191ce6a63b3952e8def7d

Authored by 程雨佳
1 parent 962ceed7

上传头像

phpapi/apicp.UploadHeadImg.php
... ... @@ -41,15 +41,10 @@
41 41  
42 42 // 组装用户需要的数据
43 43 $headimg = 'http://' . $_SERVER['SERVER_NAME'] . $tarfilename;
44   - echo $headimg;
45 44 $time = time();
46   -
47 45 // pdo保存数据
48   - $updateSql = "UPDATE user SET headimg = {$headimg}, created = {$time} WHERE id = {$id};";
49   - echo '11111';
50   - echo $updateSql;exit;
  46 + $updateSql = "UPDATE user SET headimg = '{$headimg}', created = {$time} WHERE id = {$id};";
51 47 $rowCount = $mysql->update($updateSql);
52   - echo '222';
53 48  
54 49 if ($rowCount) {
55 50 JsonResponse::result([
... ...