新浪SAE php能够获取微信的头像,但是在本地运行代码获取不到?
天蓬老师
天蓬老师 2017-05-16 13:11:20
0
1
572

在新浪云上建立了一个云应用SAE php标准环境,PHP获取微信的头像图片转换成base64字符串在网页上显示出来,在新浪云上代码正常执行,但是在本地用 WAMPSERVER 3.0.6 64bit启动的服务代码就报错,手欠把新浪云应用关闭了,成功页面无法贴出来,在此贴一下主要代码

其他服务器上的图片可以正常显示,只有微信图片的在本地服务器报错,新浪云上都正常显示

网上的说 完美解决failed to open stream: HTTP request failed!文章已经试过,完全无效,刚学习php,希望同行帮忙解答一下,拜谢

     测试  
   

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all (1)
我想大声告诉你

You have failed to request the WeChat avatar file. It is recommended to use curl to obtain the remote image, and then judge whether the acquisition is successful based on the return value. After success, use the gd function to process the avatar.

 
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!