需要替代iFrame

时间:2014-03-16 21:13:36

标签: php iframe

目前我有一个页面基本上从我的FTP中的/ Upload文件夹中的文件中提取信息...但是iFrame提出了一些问题:

http://gamesave.me/guide-details.php?id=32

如果我鼠标悬停在文本上并向上/向下滚动,我没有问题,但是如果我将鼠标向右移动到空白区域并尝试向上/向下滚动,则页面变为非常短。我认为这是因为iFrame中此页面上使用的对象。我需要使用iFrame的替代品吗?或者我只是在我的代码中添加一些东西?

<?php 
if($_REQUEST['id']=='')
{
header("location:index.php");
exit;
}
session_start();
    ob_start();
    include("includes/config.php");
$data=mysql_fetch_assoc(mysql_query(sprintf("select * from  game_guide where id='%s'",$_REQUEST['id'])));
    if($data['id'])
    {
    $user_id=$data['user_id'];  
    }
    else
    {
    $user_id='';    
    }
    if($user_id)
    {
    $dataadsense=mysql_fetch_assoc(mysql_query(sprintf("select * from adsense where user_id='%s'",$user_id)));  
    }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<title>GameSave.me (FAQ/Walkthrough) - Monetize your Game Guides!</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="css/style_sticky.css" />

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_IN/all.js#xfbml=1&appId=545106498912954";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="header">
  <div id="top">
    <div class="logo"><a href="index.php"><img src="images/logo.png" alt="" /></a></div>

    <div class="search_bar">
        <?php echo stripslashes($dataadsense['header']); ?>
    </div>
  </div>
  <div style="clear:both;"></div>
  <div class="mainnav">
     <div class="fb-like" data-href="http://gamesave.me/guide-details.php?id=<?php echo $_REQUEST['id']; ?>" data-layout="standard" data-action="like" data-show-faces="false" data-share="false"></div>
    <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a> 
    <div class="g-plusone" data-size="medium"></div>
    <script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
  </div>
 </div> 
  <div style="clear:both;"></div>
  <div class="content_box">
<?php if($data['guide']){ ?>
<p style="overflow-y: hidden;"><iframe src="upload/<?php echo $data['guide'];?>" width="1600" height='1200' frameBorder="0"></iframe></p>
<p>

<?php
    /*$myFile = "http://vtdesigns.in/projects/savegamenew/upload/".$data['guide'];
    $fh = fopen($myFile, 'r');
    $theData = fread($fh, 5000000);
    fclose($fh);
    echo $theData;*/
    ?>     
</p>
<?php }?></div>
</body>
</html>

0 个答案:

没有答案