$imgsource="qrcodes/1.png";$image = file_get_contents($imgsource); //将文件信息读取到一个内存中的字符串变量$im = imagecreatefromstring($image);//从字符串信息创建图片