用户< a>将页面链接到另一页面在PHP中标记 [英] Link one page to another by user <a> tag in PHP

查看:49
本文介绍了用户< a>将页面链接到另一页面在PHP中标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我一页上的海报代码

Here is my code of my poster in one page

 <a href="#"><img href="#"></a>

现在,我想将其链接到另一个页面,假设我单击了href ="mydomain.com/1"的说 它将重定向到另一个页面并仅播放该文件.该页面的代码为

Now I want to link this to another page suppose I click on say for a href="mydomain.com/1" it will redirect to another page and play that only file.Code for that page is

 if($playlistitem<=18)
  { 

echo '<ul>';
echo '<li class="xtitle">'.$post->title.'</li>';
echo '<li class="xdesc">'.$post->description.'</li>';

$dc=$post->children('http://search.yahoo.com/mrss/');
echo '<li class="xthumb">'.$dc->thumbnail->attributes()->url.'</li>';
echo '<li class="xpreview">'.$dc->thumbnail->attributes()->url.'</li>';


echo '<li class="xsources_mp4">'.$dc->content->attributes()->url.'</li>';

$dc->content->attributes()->url=preg_replace('/.mp4/','.webm',$dc->content->attributes()->url);
 echo '<li class="xsources_webm">'.$dc->content->attributes()->url.'</li>';
 echo '</ul>';
$playlistitem++;


 }

谁是

<ul>
  <li class="xtitle">Breathing</li>
   <li class="xdesc">Roman Kogler (Thomas Schubert) is 19 years old and</li>
  <li class="xpreview">http://spoti.com/images/media/14496l.jpg</li>
    <li class="xsources_mp4">http://uk.clip- 1.filmtrailer.com9235_33612_a_5.mp4?log_var=179|341100232-1|-</li>
   <li class="xsources_webm">http://uk.clip-1.filmtrailer.com/9235_33612_a_5.webm?log_var=179|341100232-1|-</li></ul>

推荐答案

如果要将数据传递到另一个页面,则可以以GET方式附加到URL.

If you want to pass data to another page, you could append to the URL in a GET fashion.

例如:

<a href="www.mydomain.com/show.php?img=myimage.jpg">Get Details</a>

在这里,我们将值myimage.jpg传递到show.php页面.

Here, we are passing a value myimage.jpg to the show.php page.

因此,在show.php页面中,您可以使用$_GET访问此数据. 例如:

So, in show.php page, you could access this data using the $_GET. For example:

<?php
$img_name = $_GET['img']; //will get the value "myimage.jpg"
//... use this data to do whatever you need
?>

这篇关于用户&lt; a&gt;将页面链接到另一页面在PHP中标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆