タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

phpとpecl_httpに関するs99e209のブックマーク (2)

  • PHP replacement of http_build_url (PHP PECL pecl_http >= 0.21.0) · GitHub

    http_build_url.php <?php // handy script from tycoonmaster at gmail dot com // http://fi2.php.net/manual/en/function.http-build-url.php#96335 // I didn't make this but I think it is useful so I store / share it here if (!function_exists('http_build_url')) { define('HTTP_URL_REPLACE', 1); // Replace every part of the first URL when there's one of the second URL define('HTTP_URL_JOIN_PATH', 2); // J

    PHP replacement of http_build_url (PHP PECL pecl_http >= 0.21.0) · GitHub
    s99e209
    s99e209 2015/12/13
    php-pecl-http v2 へアップデートしたときの http_build_url関数の代用コード。
  • Fatal error: Call to undefined function http_redirect() | Spacekey

    CentOS7 + PHP 5.6.3で、単純にhttp_redirectを使おうとしたら、 Fatal error: Call to undefined function http_redirect() とかでました。 と言うのも、現在PHPをまったくの0から教えるということを始めていて、フレームワーク等一切使わず、プレーンなPHPでHello WorldやPOSTしてみたり…を順番にやってみてます。 で、私自身も試しに動かしてみたりするんですが、「登録して一覧にリダイレクト」みたいなごく基的なことをやろうとして引っかかりました。 原因は、pecl_httpのバージョンが2になっているからです。 現在の最新は、2.2.0。 2.0.0以降はv1系と全く違うものになっているらしく、後方互換性がなくなっています。要するにhttp_redirectという関数はなくなっているのです。これだけじ

    s99e209
    s99e209 2015/12/13
    PHP 5.6以降はpecl_httpのバージョンが2になったことで後方互換性がなくなり、http_redirect() や http_build_url() が使えなくなった。
  • 1