开发者

i need to pass url var in the scr of a iframe

i need to know how to pass everything after the .php part in this link

"http://wreckedclothing.net/help/view.php?e=john@wreckedclothing.net&t=985559"

to a iframe on the same page. "hosted 开发者_如何学Goon the same site" like this

"<iframe>
      src="http://www.wreckedclothing.net/help.php?e=john@wreckedclothing.net&t=985559"
      frameborder="0"
      width="829"
      name="tree"></iframe>

see how it adds everything to the link in src


$_SERVER['QUERY_STRING'] contains the query string ("everything after the .php part", except the "?", that is).

So if you're in a php-page, you could do something like this:

<iframe src=[YOUR_URL_HERE]?<?php echo $_SERVER['QUERY_STRING']; ?>></iframe>

to pass the whole query-string that has been send to the page containing the iframe to the src of the iframe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜