我正在尝试使用php代码在页面上显示评论框:
$object_id = 'article_12';
include('commentanything/php/loadComments.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'];
}
}
我试图在&#39;。$ chart。&#39;之后立即显示它。但它一直出现在标题
中答案 0 :(得分:0)
它看起来像你没有在index和loadComments.php中匹配HTML。
首先复制你的loadComments.php代码来代替include(&#39; commentanything / php / loadComments.php&#39;);
并检查html / css错误。它在那里。
如果它也失败了,你的php / html嵌套是错误的我无法告诉你,因为你甚至不知道我们如何以及你在哪里填充php。您只需在上面显示的代码中添加变量