-2
我正在開發一個分析商店數據的網站。 我需要我的數組的URL部分看起來像這樣:URL的爆炸數組
array(
'url' => 'http://some.website.com:8080/SASStoredProcess/do?_username=user-123',
'_password' => 'passwd',
'_program' => '/Utilisateurs/DARTIES3-2012/Mon dossier/analyse_dc',
'annee' => '2012',
'ind' => 'V',
'_action' => 'execute'
);
我現在有這一點,並正在努力將其轉換爲所需的格式:
array(
'url' => 'url=http://some.website.com:8080/SASStoredProcess/do?_username=user-123&_password=passwd&_program=%2FUtilisateurs%2FDARTIES3-2012%2FMon+dossier%2Fanalyse_dc&annee=2012&ind=V&_action=execute',
'otherKey' => 'otherValue'
);
請有人可以幫我轉換第二個代碼塊中的URL看起來像第一個代碼塊?提前致謝。
看看http://php.net/manual/en/function.parse-str.php – Galen 2013-03-05 10:19:44
你不應該在URL中傳遞密碼 – acutesoftware 2013-03-05 10:20:05
你可以做一個foreach ... – 2013-03-05 10:20:08