Jump to content

Recommended Posts

I am starting to think very poorly of php. How do I make php links open in a new window?

Please modify these codes for me so that they open in a new window

Code: 1
[code]<?php include("http://www.despair.nu/link.php?uid=1018") ?>[/code]

Code: 2
[code]<?php readfile("http://www.exentrique.com/link.html?user=lileminem300"); ?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/12306-new-window/
Share on other sites

that's not what those functions do. include() includes the file in your current files, and readfile reads the file. they have nothing to do with displaying links. if you want to display a link on your page and have it open an new window, that's an html thing.

<a href='blah.php' target='_blank'>blah</a>

if you want to display it through php then you would do something like

echo "<a href='blah.php' target='_blank'>blah</a>";
Link to comment
https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47007
Share on other sites

^^ OH OK, I got that from a rotation site. If I did something like

[code]<a target="_blank" href="http://www.despair.nu/link.php?uid=1018">Despair</a>[/code]

I would get [a href=\"http://www.despair.nu/link.php?uid=1018\" target=\"_blank\"]http://www.despair.nu/link.php?uid=1018[/a]

Its shows two links, and they just didn't put the target bank in their links
Link to comment
https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47029
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.