阅读(2736) (0)

set_query_string()

2017-06-22 14:35:23 更新

作用:设置URL查询字符串并重新加载页面。 语法: null set_query_string(mixed $key[, mixed $value])

参数:

  • $key 查询字符串中参数的键名,也可以设置为一个关联数组同时设置多个参数。
  • $value 查询字符串中参数的值,当设置为 null 时将删除这对参数。

示例:

<?php
set_query_string('page', 2); //设置一组参数
set_query_string(array( //同时设置多组参数
    'page'=>2,
    'limit'=>15
));