2012-03-27 76 views
-6

我當前的代碼是:PHP代碼來修改URL

$scripturl.'main.php?i='.$app_id.'&s='.$app_secret."&n=".$n, 'response_type' => 'code')); 

我想補充&display=touch到結果URL的末尾,就像這樣:

status_update%2Cuser_birthday%2Cpublish_stream&response_type=code&display=touch 

如果我在添加它以上這樣的代碼:'response_type' => 'code&display=touch'

結果URL示出了這樣的:

status_update%2Cuser_birthday%2Cpublish_stream&response_type=code%26display%3Dtouch 

它將&轉換爲%26=%3D。如何添加&display=touch而不觸發該效果?

+0

您的文章幾乎是不可能的閱讀。請重新閱讀[格式幫助](http://stackoverflow.com/editing-help)以瞭解如何格式化該帖子。 – sarnold 2012-03-27 01:25:09

+0

感謝您編輯Michael – 2012-03-27 01:25:56

回答

1

添加'display' => 'touch'作爲另一個元素數組中:

$scripturl.'main.php?i='.$app_id.'&s='.$app_secret."&n=".$n, 'response_type' => 'code', 'display' => 'touch'));