如何使用 drupal 7 使用 drupal_goto 发送变量

Abe*_*ben 3 php drupal drupal-7

我正在尝试使用 drupal_goto 函数,但它重定向到错误的 URL

这是我的代码

$dis='user/' . $account->uid . '/edit/?id=6356928';
 drupal_goto($dis);
Run Code Online (Sandbox Code Playgroud)

ID的问题

有什么建议 ??

Muh*_*eda 5

drupal_goto使用与url()相同的$options设置。

尝试执行以下操作

drupal_goto("user/" . $account->uid . "/edit", array(
    'query' => array(
        'id' => '6356928',
    ),
));
Run Code Online (Sandbox Code Playgroud)