ballpen
V2EX  ›  问与答

为了避免最近那个漏洞 把 win php 升级到 5.4.41 出现 PHP Warning: file_get_contents

  •  
  •   ballpen · May 28, 2015 · 3352 views
    This topic created in 4025 days ago, the information mentioned may be changed or developed.

    WordPress 页面都没问题,登录页面提示
    PHP Warning: file_get_contents(http://www.frontopen.com/FO_updata.php?key=host&hostname

    织梦也没问题,登录页面 验证码不显示

    求解

    已经使用过的方法
    http://blog.sina.com.cn/s/blog_700e11ff0101228l.html

    5 replies    2015-05-28 15:50:57 +08:00
    MaiCong
        1
    MaiCong  
       May 28, 2015 via iPhone
    用curl吧
    xbonline
        2
    xbonline  
       May 28, 2015
    生产环境果断display_errors=0啊
    ballpen
        3
    ballpen  
    OP
       May 28, 2015
    @xbonline
    @MaiCong

    不行啊 都试了
    b821025551b
        4
    b821025551b  
       May 28, 2015
    error_reporting(0);
    fangjinmin
        5
    fangjinmin  
       May 28, 2015
    更改php.ini的allow_url_fopen,设置成1.或者在调用file_get_contents之前,调用ini_set('allow_url_open', 1);
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3293 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 11:41 · PVG 19:41 · LAX 04:41 · JFK 07:41
    ♥ Do have faith in what you're doing.