1、先在某个控制器里写一个拼接跳转页面链接信息的方法,如:
要跳转的链接是 http://xxxxx.xxx.cn/index.php?s=/Admin/Test/index/id/101/cid/101
//二维码
public function qrcode(){
header("location: http://xxxxx.xxx.cn/index.php?s=/Admin/Test/index/id/".urlencode($id)."/cid/".urlencode($cid));
}
2、取出调用二维码方法的链接
如: http://xxxxx.xxx.cn/index.php?s=/Wechat/Test/qrcode
3、打开浏览器,搜索“草料二维码”,如下所示:
4、选择文本,输入链接,选择“生成二维码”:
5、保存生成的二维码