Home>Article>Backend Development> How to produce and download php QR code

How to produce and download php QR code

一个新手
一个新手 Original
2017-09-29 10:25:22 2258browse

30){ echo ""; return ; } */ //返回的文件 header("Content-type: application/octet-stream"); //按照字节大小返回 header("Accept-Ranges: bytes"); //返回文件大小 header("Accept-Length: $file_size"); //这里客户端的弹出对话框,对应的文件名 header("Content-Disposition: attachment; filename=".$file_name); //向客户端回送数据 $buffer=1024; //为了下载的安全,我们最好做一个文件字节读取计数器 $file_count=0; //这句话用于判断文件是否结束 while(!feof($fp) && ($file_size-$file_count>0) ){ $file_data=fread($fp,$buffer); //统计读了多少个字节 $file_count+=$buffer; //把部分数据回送给浏览器; echo $file_data; } //关闭文件 fclose($fp); }

The above is the detailed content of How to produce and download php QR code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is symfony Next article:what is symfony