尝试将PHP变量添加到javascript重定向URL位置

时间:2015-02-27 02:11:34

标签: javascript php

我成功使用javascript从php wordpage重定向(我必须使用javascript bc标头已经发送)。唯一的问题是URL不会捕获在网页开头的php中捕获的$ the_SID变量。是不是可以跳转到PHP来将$ the_SID号码添加到下面的javascript代码中的URL?

//THIS redirects to the full page, but data blank bc $the_SID is not in URL
<script type="text/javascript">
window.location.href = "http://example.com/full/?sid=<? $the_SID ?>";
</script>

有什么想法吗?

0 个答案:

没有答案