简体   繁体   English

php头文件在localserver(垃圾服务器)上运行良好,但在联机服务器(000webhost)上运行不正常

[英]php header file working well on localserver (wamp server) but not working well on online server (000webhost)

Header file works well on local server (wampserver) but doesn't work on 000webhost. 头文件在本地服务器(wampserver)上运行良好,但在000webhost上不起作用。

Here is the code: 这是代码:

header("refresh:4   url=http://localhost/www.paytoservice.com/login.php");

How do I resolve this? 我该如何解决?

000Webhost is notorious for disabling random functions/features randomly. 000Webhost以随机禁用随机功能而闻名。 So it's possible it might be disabled altogether. 因此,有可能完全禁用它。

header( "refresh:4;url=http://www.paytoservice.com/login.php" );

If the code you posted is from your live site, you need to remove the localhost aspect from the domain name and this should work though. 如果您发布的代码来自您的实时站点,则需要从域名中删除localhost方面,但这应该可以工作。

Edit 编辑

header("Refresh:42;URL=http://www.paytoservice.com/login.php", true, 301);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM