本文整理汇总了PHP中comments::show方法的典型用法代码示例。如果您正苦于以下问题:PHP comments::show方法的具体用法?PHP comments::show怎么用?PHP comments::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comments
的用法示例。
在下文中一共展示了comments::show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _activityshow
public function _activityshow()
{
$Comments = new comments();
$Comments->add($_SESSION["USERID"], $_POST['activityrecive'], $_SESSION["ACTIVITYID"]);
$re = $Comments->show($_SESSION["ACTIVITYID"], $_POST['groupactivity']);
$i = $_POST['groupactivity'];
foreach ($re as $r) {
$commentshow .= "<div id='comment-" . $r->CommentsId . "' style='display:none'>\n\t\t\t\t<div id='comment_recive'>\n\t\t\t\t<div id='user_picture'><img src='/upload/avatar_small/" . $r->UserId . "_small.jpg' style='float:left'>\n\t\t\t\t</div>\n\t\t\t\t<div id='comment_text'>\n\t\t\t\t" . htmlspecialchars($r->CommentText) . "\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t</div>";
$i++;
$commentshow .= "<script>\$('#comment-" . $r->CommentsId . "').show('slow')</script>";
}
$commentshow .= "<script>\$('#groupactivity').val(" . $i . ");</script>";
echo $commentshow;
}
示例2: show
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . 'tz/model/connectDB.php';
class comments extends connectDB
{
public function show()
{
$this->createObjectMysqli();
$this->mysqli->query("SET NAMES 'utf8'");
$stmt = $this->mysqli->query("SELECT comments FROM tz2016");
while ($row = $stmt->fetch_assoc()) {
require $_SERVER['DOCUMENT_ROOT'] . 'tz/views/showComments.php';
}
$this->closeMysqli();
}
}
$comm = new comments();
$comm->show();