2012-03-27 77 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'));