js加密参数encodeURIComponent,php解密参数urldecode

window.location.href='download_file?text=' + encodeURIComponent(text) + '&voice=' + voice + '&speech_rate=' + speech_rate;
if (!$text = trim($_REQUEST['text'])) {
    $this->json->E('请输入文本内容');
}
$text = urldecode($text);

避免特殊字符,影响参数传递。

posted @ 2020-06-22 14:51  TBHacker  阅读(539)  评论(0编辑  收藏  举报