当前位置:Gxlcms > PHP教程 > phphttp_build_query()构建查询参数的小例子

phphttp_build_query()构建查询参数的小例子

时间:2021-07-01 10:21:17 帮助过:16人阅读

  1. /**
  2. * http_build_query() 构建查询参数
  3. * edit: bbs.it-home.org
  4. */
  5. $vars = array('page' => 4, 'search' => 'this & that');
  6. $qs = http_build_query($vars);
  7. $url = 'http://bbs.it-home.org/search.php?' . $qs;
  8. $page = file_get_contents($url);
  9. ?>

人气教程排行