http.so loaded but http_get undefined

前端 未结 2 556
时光取名叫无心
时光取名叫无心 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: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.

提交回复
热议问题