//网签生成图片
        if (empty($data['signature'])) {
            return $result = ['code' => 0, 'msg' => '请签名后再提交!'];
        }

        //将图片流写入图片文件
        $file_path = ROOT_PATH.'public_html/uploads/signature';
        if (!file_exists($file_path)){
            mkdir($file_path);
        }
        $file_name = $this->c_user_id.'.png';
        $file = $file_path . '/' . $file_name;
        if (file_exists($file)) {
            unlink($file);
        }

        $image = file_get_contents ( $data['signature']);
        if (@$fp = fopen ( $file, 'w+' )) {
            fwrite ( $fp, $image );
            fclose ( $fp );
        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-11-23
  • 2022-12-23
  • 2021-06-14
  • 2021-10-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-19
  • 2021-08-02
  • 2021-09-05
相关资源
相似解决方案