http.so loaded but http_get undefined

前端 未结 2 557
时光取名叫无心
时光取名叫无心 2020-12-20 22:45

I have LAMP installed on my linux distribution:

///

PHP 5.4.9-4ubuntu2.4 (cli) (built: Dec 12 2013 04:29:20) Copyright (c) 1997-2012 The PHP Group Zend Engi

相关标签:
2条回答
  • 2020-12-20 23:09

    Just to elaborate slightly on Alex's answer, unless I missed something, the Php Manuel doesn't really reflect how this extension has changed. And the link in the comment on your question doesn't seem to work anymore. I think what you want now, to get that same behavior, is http\Client::send().

    0 讨论(0)
  • 2020-12-20 23:20

    As Michael Berkowski says, the 2.x branch is totally new and it works with a different API.

    You can go with the 1.x branch and use the old functions this way:

    pecl uninstal pecl_http
    pecl install pecl_http-1.7.6
    

    Then you can use http_get

    Anyway, if this is a fresh new project, it is recommended to go with the newest API.

    0 讨论(0)
提交回复
热议问题