僞靜態地址指的是將普通url美化後的地址,比如sjh/index.php?y=2&p=1;
可以寫成sjh/index.php/2/1.html
#fs.php
//將僞靜態的數字通過正則表達式提取出來
preg_match('/^\/(\d+)\/(\d+).html/',$_SERVER['PATH_INFO'],$arr);
$type=$arr[1];
$id=$arr[2];
//剩餘代碼自己操作,比如可查詢僞靜態數字對應的數據庫裏的值等等
僞靜態地址指的是將普通url美化後的地址,比如sjh/index.php?y=2&p=1;
可以寫成sjh/index.php/2/1.html
#fs.php
//將僞靜態的數字通過正則表達式提取出來
preg_match('/^\/(\d+)\/(\d+).html/',$_SERVER['PATH_INFO'],$arr);
$type=$arr[1];
$id=$arr[2];
//剩餘代碼自己操作,比如可查詢僞靜態數字對應的數據庫裏的值等等
maven中的${project.groupId} 和 ${project.version} 表示當前項目的groupId和版本。