标签:qrcode code weixin curl ini head fopen init dex
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); }
标签:qrcode code weixin curl ini head fopen init dex
原文地址:https://www.cnblogs.com/huanghanyi/p/9015761.html