php 新选项卡中的标题位置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12539011/
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 03:45:32  来源:igfitidea点击:

Header Location in new tab

php

提问by Khawer Zeshan

Possible Duplicate:
redirect in a new window

可能重复:
在新窗口中重定向

Please don't mind if it is foolish question,

请不要介意这是一个愚蠢的问题,

Is it possible in php to open a window in new tab using

是否可以在 php 中使用在新选项卡中打开一个窗口

  header(Location: 'blahblah');

回答by doublesharp

No, it is not possible. The header will simply redirect the current page, in the current window/tab.

不,这是不可能的。标题将简单地重定向当前页面,在当前窗口/选项卡中。

回答by junedkazi

No it is not possible using php as php is a server side language and what you are want is a client side feature. So you will have to do it with some javascript.

不,不可能使用 php,因为 php 是一种服务器端语言,而您想要的是客户端功能。所以你将不得不使用一些 javascript 来完成它。

You can definitely try something like this via javascript

你绝对可以通过javascript尝试这样的事情

<script type="text/javascript" language="Javascript">window.open('http://www.example.com');</script>