
1 saharabear 2012 年 12 月 19 日 看一下php.ini里面有没有打开fopen的选项。 |
2 solf OP @saharabear 都打开了。就是域名不会解析 |
3 kingwkb 2012 年 12 月 20 日 为什么要自己编译呢,Amazon 的yum很好 |
4 BOYPT 2012 年 12 月 20 日 file_get_contents如果有错误会在log里面给warnning的,看看log了什么吧,怎么就说是DNS呢 |
5 solf OP @BOYPT 没有任何warning或者notice。如果用getimagesize就有read error的warning。 gethostbyname等function都正常 |
6 BOYPT 2012 年 12 月 20 日 @solf 那应该是其他问题了. Stackoverflow找到个相似的: http://stackoverflow.com/questions/4172860/file-get-contents-returns-epty-string 说是PHP的bug~ |
11 solf OP @BOYPT 谢谢提醒。 解决办法是编译的时候将 ‘--with-curlwrapper’ 去掉,因为这个参数还在实验阶段。去掉后fopen就会使用http的wrapper,而不是用curl的wrapper。 我是在以下链接找到解决办法 http://weizhifeng.net/wrong-with-curlwrappers.html |