Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在用户购买php文件后,如何在我的网站中重定向用户?_Php - Fatal编程技术网

在用户购买php文件后,如何在我的网站中重定向用户?

在用户购买php文件后,如何在我的网站中重定向用户?,php,Php,用户在我的php文件中购买后,如何在我的网站中重定向用户?不确定您是在寻找客户端重定向还是服务器端重定向。但两者都有 服务器端PHP重定向 要通过PHP重定向用户,可以使用。只需确保在调用header之前没有HTML输出,并且使用exit或die来阻止脚本继续执行 <?php header("Location: http://www.example.com/"); /* Redirect browser */ /* Make sure that code below does not g

用户在我的php文件中购买后,如何在我的网站中重定向用户?

不确定您是在寻找客户端重定向还是服务器端重定向。但两者都有

服务器端PHP重定向 要通过PHP重定向用户,可以使用。只需确保在调用header之前没有HTML输出,并且使用exit或die来阻止脚本继续执行

<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>
客户端元重定向 您还可以使用meta refresh标记重定向人员

当用户禁用JS时,这将起作用


但是,我要警告不要使用客户端重定向,因为它们看起来非常不专业,而且在JS重定向的情况下,它们甚至不能保证工作。

如何修复此加密狗?headerLocation:yourpage.php;塔达!但是用户向银行服务器而不是我的服务器请求购买。如果您与电子商务API集成,几乎可以保证他们会为您提供一种传递返回url的方法。你需要阅读文档。嘿,朋友们,试着理解他的问题并开始投票。你们为什么要这样做。他可能是个新手,不要让他泄气@安卓别担心,你应该问一个足够详细的问题。谢谢你帮助他@Tim
// similar behavior as an HTTP redirect
window.location.replace("http://example.com");
<meta http-equiv="refresh" content="0; url=http://example.com/" />