wuxiaolin
V2EX  ›  PHP

php 使用 curl 报错, Failed to connect to localhost port 1080

  •  
  •   wuxiaolin · Jul 30, 2016 · 4927 views
    This topic created in 3591 days ago, the information mentioned may be changed or developed.

    我是 win7 64 位的系统,配好 php 后使用 curl 报错: Failed to connect to localhost port 1080: Connection refused 查了下说是 socket 代理的问题,有谁遇到一样情况的吗?是否有解决方法

    Supplement 1  ·  Jul 30, 2016
    问题描述的不是很好,抱歉了。
    我使用 php 的 curl 去请求网站时,如 www.baidu.com 。 curl 返回以上错误。
    我想看下有没人跟我遇到一样的情况的,是否有解决方法?
    ps:该错误只会在 cli 模式发生,浏览器访问是正常的
    7 replies    2016-08-05 16:29:58 +08:00
    lianz
        1
    lianz  
       Jul 30, 2016
    《提问的艺术》
    popu111
        2
    popu111  
       Jul 30, 2016
    命令行配置代理了?自查一下
    i4mszengg
        3
    i4mszengg  
       Jul 30, 2016
    没有 openssl 吧
    muziyue
        4
    muziyue  
       Jul 30, 2016
    代理问题吧, 1080 不是 ss 常用端口么
    iVanilla
        5
    iVanilla  
       Jul 30, 2016
    你是不是用了 SS 科学上网?关掉再试试看。
    Stlin
        6
    Stlin  
       Jul 30, 2016
    SS 开了全局吧?
    wuxiaolin
        7
    wuxiaolin  
    OP
       Aug 5, 2016
    感谢上面各位,我试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2807 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 14:58 · PVG 22:58 · LAX 07:58 · JFK 10:58
    ♥ Do have faith in what you're doing.