在PHP代码中使用data-ajax标记


Using data-ajax tag inside PHP code

我使用Dreamweaver提出的代码在使用表单创建记录后打开URL。下面是完成它的PHP代码:

  $insertGoTo = "registroOK.html";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));

在我的网站上,我使用JQuery移动,通常我使用标签data-ajax='false'在<a href>标签内,当我想去一个外部文件,但我不知道如何实现这里面的PHP代码定义的URL打开。

这个问题不是PHP问题。这是一个JQM问题,把它放在每个页面标题部分解决了:

<script type="text/javascript">
$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});
</script>

感谢您的时间和努力