Include php正在标题中抛出结果
我尝试使用php代码在页面上显示注释框:Include php正在标题中抛出结果,php,append,Php,Append,我尝试使用php代码在页面上显示注释框: $object_id = 'article_12'; include('commentanything/php/loadComments.php'); 出于某种原因,注释框没有出现在我希望它出现的地方,它一直将注释框扔到标题处,是否有任何方法可以使它准确地出现在我希望它出现的地方?下面是我尝试使用它的地方(不是完整的代码): “.$额外链接。” “.$seo_链接。” “.$comment。” “.$charts。” '; $object_id=
$object_id = 'article_12';
include('commentanything/php/loadComments.php');
出于某种原因,注释框没有出现在我希望它出现的地方,它一直将注释框扔到标题处,是否有任何方法可以使它准确地出现在我希望它出现的地方?下面是我尝试使用它的地方(不是完整的代码):
“.$额外链接。”
“.$seo_链接。”
“.$comment。”
“.$charts。”
';
$object_id='article_12';
包括('commentanything/php/loadComments.php');
$start=(isset($row['extra_id']))$行['extra_id']:$row['id'];
}
}
我试图在“$charts”之后立即显示它。但它一直显示在标题中看起来您还没有在index和loadComments.php中匹配HTML 首先复制loadComments.php代码以代替include('commentanything/php/loadComments.php') 并检查html/css错误。就在那里 如果它也失败了,你的php/html嵌套是错误的,我说不出这一点,因为你甚至不知道我们是如何和在哪里填充php的。您只需在上面显示的代码中添加变量
<!--<h1 align="center" style="font-size:1.2em"><strong>'.$row['title'].'</strong></h1>-->
<div class="song-art"><a href="'.$this->url.'/mp3download/'.$row['id'].'/'.$this->genSlug($row['title']).'.html"><img src="'.$this->url.'/thumb.php?src='.$row['art'].'&t=m&w=112&h=112" id="song-art'.$row['id'].'" title="'.$row['title'].'" alt="'.$row['title'].'"/></a></div>
<div class="song-top">
<div class="song-timeago">
<a href="'.$this->url.'/mp3download/'.$row['id'].'/'.$this->genSlug($row['title']).'.html"><span id="time'.$row['id'].'">
<div class="timeago'.$b.'" title="'.$time.'">
'.$time.'
</div>
</span>
</a>
</div>
<div data-track-name="'.$row['name'].'" data-track-id="'.$row['id'].'" id="play'.$row['id'].'" class="track song-play-btn">
</div>
<div class="song-titles">
<div class="song-author"><a onmouseover="profileCard('.$row['idu'].', '.$row['id'].', 0, 0);" onmouseout="profileCard(0, 0, 0, 1);" onclick="profileCard(0, 0, 1, 1);" href="'.$this->url.'/index.php?a=profile&u='.$row['username'].'">'.realName($row['username'], $row['first_name'], $row['last_name']).'</a></div>
<div class="song-tag">
<a href="'.$this->url.'/index.php?a=explore&filter='.$tag.'">'.$tag.'</a>
</div>
<div class="song-title">
<div class="track-link"><h2 style="font-size:1.0em">
<!--<a href="'.$this->url.'/mp3download/'.$row['id'].'/'.$this->genSlug($row['title']).'.html" id="song-url'.$row['id'].'"><div id="song-name'.$row['id'].'">'.$row['title'].'</div></a>-->
</h2></div>
</div>
</div>
</div>
<div class="player-controls">
<div id="song-controls'.$row['id'].'">
<div id="jp_container_123" class="jp-audio">
<div class="jp-type-single">
<div class="jp-gui jp-interface">
<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="track-actions-container">
</div>
'.$extra_links.'
'.$seo_links.'
'.$comment.'
'.$charts.'
</div>';
$object_id = 'article_12';
include('commentanything/php/loadComments.php');
$start = (isset($row['extra_id'])) ? $row['extra_id'] : $row['id'];
}
}