本文整理汇总了PHP中Mysql::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Mysql::getContent方法的具体用法?PHP Mysql::getContent怎么用?PHP Mysql::getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mysql
的用法示例。
在下文中一共展示了Mysql::getContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Mysql
<?php
require 'db.php';
$mysql = new Mysql();
echo $mysql->getContent('todolist');
示例2: Weather
<?php
require 'db.php';
require 'news.php';
require 'weather.php';
$weather = new Weather();
$weathers = $weather->getResponse();
$newscontent = array("习近平佩戴3D眼镜视察", "NBA常规赛即将举办", "黑客马拉松在济南顺利举办");
$new = new News();
$newscontent = $new->parseHTML();
$mysql = new Mysql();
$configs = $mysql->getContent('config');
$configs = explode(",", $configs);
$todolist = $mysql->getContent('todolist');
$todolist = explode(",", $todolist);
$result = "";
foreach ($configs as $key => $value) {
if ($value == 1) {
$result .= join("#", $weathers);
$result .= "#";
}
if ($value == 2) {
$result .= join("#", $newscontent);
$result .= "#";
}
if ($value == 3) {
$result .= join('#', $todolist);
}
}
echo $result;