我正在尝试使用cakephp的重定向控制器函数重定向包含#标签符号的URL.
当我使用这段代码时,它会对主题标签进行编码
$this->redirect(array('action' => 'index',$menuItem."#article_id_".$created_id));
output: http://something.com/link%23article_id_62
Run Code Online (Sandbox Code Playgroud)
有办法吗?
dei*_*zel 10
你需要使用#密钥:
$this->redirect([
// ...
'#' => 'article_id_' . $created_id,
]);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2638 次 |
| 最近记录: |