看一下传参数这个问题,我不太明白
$action = $_REQUEST['act'] ? $_REQUEST['act'] : 'list';为什么要这样写,什么意思,不明白
if ($action == 'list')
{
/* 分页 */
$tpp = 15;
$page = max(1, intval($_REQUEST['page']));
$start_limit = ($page - 1) * $tpp;
$url = "?act=list";
$cat_id = isset($_REQUEST['cat_id']) ? intval($_REQUEST['cat_id']) : 0;这块为什么又这样写呢,后面还多个0
switch ($sortkey)
{
case 'id':
$order = " ORDER BY id DESC ";
$url .= "&orderby=$orderby";这块为什么用.=呢
break;
case 'visit':
$order = " ORDER BY views DESC ";
$url .= "&ord
[解决办法]
$url .= "&orderby=$orderby";这块为什么用.=呢
拼装url连接。
我来补充个例子
$url = '123456';
$url .= '789';
echo $url;
//输出:123456789