二維碼轉存為圖片
阿新 • • 發佈:2018-05-09
bin header aaaaaa https lose clas HR code aaa
public function index(){ $url = ‘https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEA8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLn‘; $file = "public/uploads/1.jpg"; $ch = curl_init($url); $fp = fopen($file, ‘wb‘); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); // curl_close($ch); fclose($fp);$fp = fopen($file, ‘wb‘); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); }
二維碼轉存為圖片