我想從保存URL的變量中獲取參數。
我收到以下變量:$lastPage
,它包含上一頁的URI。PHP從url變量中獲取參數
我想從中獲取參數。
我在javascript中獲得以下腳本(我用於其他內容)
function getUrlVar(key)
{
var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search);
return result && unescape(result[1]) || '';
}
我想要類似的東西,但是對於PHP。
非常感謝您