php 通过php打开一个新的html页面

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1126350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 01:10:19  来源:igfitidea点击:

open a new html page through php

phphtml

提问by Zeeshan Rang

I want my php to open a new html page.

我希望我的 php 打开一个新的 html 页面。

I have a html page, where a member can login by typing her username and password and then click on button.

我有一个 html 页面,成员可以在其中输入用户名和密码登录,然后单击按钮。

if the username password is correct, i want my php to open a different html page in the same window.

如果用户名密码正确,我希望我的 php 在同一窗口中打开不同的 html 页面。

how can i do this??

我怎样才能做到这一点??

Zeeshan

泽山

回答by Keith Maurino

Try using the header function.

尝试使用标题功能。

header("Location: $url");

回答by Strae

Or, the 'techless' solution:

或者,“无技术”解决方案:

<html>
<head>
    <title>Redirecting...</title>
    <meta http-equiv="refresh" content="0;URL=newpage.php">
</head>
<body>
    You are being automatically redirected to a new location.<br />
    If your browser does not redirect you in few seconds, or you do
    not wish to wait, <a href="newpage.php">click here</a>. 
</body>
</html>

See Here.

这里。

回答by Insane Skull

Try Using Anchor Tag:

尝试使用锚标签:

<a href="#" >Link name</a>