1.形式一:

 <iframe scrolling="yes" src="action.php?c=HLogin&a=linkPage&p=fx" width="100%" height="100%" frameborder="0"></iframe>

----------

访问的方法:

     //关联页面管理:
public function linkPageAction()
{
$theKey = isset($_REQUEST["p"]) ? $_REQUEST["p"] : 'pj'; switch ($theKey)
{
//1: 评价:
case 'pj':
$this->pjService();
break; //2: 分析:
case 'fx':
18 $this->fxService();
break; //3: 留言板:
case 'lyb':
$this->lybService();
break; default:
$this->pjService();
break;
} }
     //2: 分析 页面:
public function fxService()
{ //1: 取出分析
$chart = array(); $AnalysisModel = new AnalysisModel();
$where["where"] = " isHidden = 0 order by orderBy asc, id asc ";
$data = $AnalysisModel->getDataList($where); foreach ($data["rows"] as $k => $model)
{
$cell = array();
$cell["id"] = $model->id;
$cell["chart"] = $model->chart;
$cell["title"] = $model->title; $chart[] = $cell;
} foreach ($chart as $k => &$v)
{
if ($v["chart"] == 0)
{
// echo "条形图";
//条形图:
$v["content"] = $this->txChartService($v["id"]);
}
else
{
// echo "雷达图";
//雷达图:
$v["content"] = $this->ldChartService($v["id"]);
} } //去除引用的变量值$v
unset($v); // echo "<pre>";
// var_dump($chart); //返回数据:
$parameter = array();
$parameter["chart"] = $chart; 52 $this->display("Home/iframe/fx.php", $parameter);
} /**
* [txChartService 处理条形图数据]
* @param [type] $id [Analysis 的 id ]
* @return [type] [description]
*/
public function txChartService($id)
{
//1: 取出 分析 对应 的 分析项:
$content = array(); $AnalysisItemModel = new AnalysisItemModel();
$where["where"] = " analysisId = $id order by orderBy asc, id asc ";
$data = $AnalysisItemModel->getDataList($where); //分析项:
$legend = array();
foreach ($data["rows"] as $k => $model)
{
$legend[$model->id] = $model->title;
} //取出学生: 如果所有的分析项 都没有数据. 那么剔除这个学生.
$yAxis = array();
$StudentModel = new StudentModel();
$where["where"] = " 1 = 1 order by orderBy asc, id asc ";
$data = $StudentModel->getDataList($where);
foreach ($data["rows"] as $k => $model)
{
$num = 0; foreach ($legend as $k2 => $v2)
{
$StudentAnalysisItemModel = new StudentAnalysisItemModel();
$where = " where studentId = $model->id and analysisItemId = $k2 ";
$StudentAnalysisItemModel->getDataRow($where); if ($StudentAnalysisItemModel->getDB == false)
{
$num++;
}
} if ($num != count($legend))
{
$yAxis[$model->id] = $model->userName;
}
} //取出每个分类项 对应 的 学生数据.
$series = array(); foreach ($legend as $k => $v)
{
$cell = array();
$cell["name"] = $v;
$cell["type"] = 'bar'; foreach ($yAxis as $k2 => $v2)
{
$StudentAnalysisItemModel = new StudentAnalysisItemModel();
$where = " where studentId = $k2 and analysisItemId = $k ";
$StudentAnalysisItemModel->getDataRow($where); if ($StudentAnalysisItemModel->getDB)
{
$cell["data"][] = intval($StudentAnalysisItemModel->score);
}
else
{
$cell["data"][] = 0;
} } $series[] = $cell;
} $hasContent = empty($yAxis) ? 0 : 1; $content["hasContent"] = $hasContent;
$content["legend"] = $legend;
$content["yAxis"] = $yAxis;
$content["series"] = $series; return $content; } /**
* [ldChartService 处理 雷达图数据]
* @param [type] $id [Analysis 的 id]
* @return [type] [description]
*/
public function ldChartService($id)
{
//1: 取出 分析 对应 的 分析项:
$content = array(); $AnalysisItemModel = new AnalysisItemModel();
$where["where"] = " analysisId = $id order by orderBy asc, id asc ";
$data = $AnalysisItemModel->getDataList($where); //分析项:
$item = array();
foreach ($data["rows"] as $k => $model)
{
$item[$model->id] = $model->title;
} //indicator:
$indicator = array();
foreach ($item as $k => $v)
{
$cell = array();
$cell["name"] = $v;
$cell["max"] = 0; $StudentAnalysisItemModel = new StudentAnalysisItemModel();
$where["where"] = " analysisItemId = $k ";
$data = $StudentAnalysisItemModel->getDataList($where);
foreach ($data["rows"] as $k2 => $model2)
{
if (intval($model2->score) > $cell["max"])
{
$cell["max"] = intval($model2->score);
}
} $indicator[] = $cell;
} //取出学生: 如果所有的分析项 都没有数据. 那么剔除这个学生.
$legend = array();
$StudentModel = new StudentModel();
$where["where"] = " 1 = 1 order by orderBy asc, id asc ";
$data = $StudentModel->getDataList($where);
foreach ($data["rows"] as $k => $model)
{
$num = 0; foreach ($item as $k2 => $v2)
{
$StudentAnalysisItemModel = new StudentAnalysisItemModel();
$where = " where studentId = $model->id and analysisItemId = $k2 ";
$StudentAnalysisItemModel->getDataRow($where); if ($StudentAnalysisItemModel->getDB == false)
{
$num++;
}
} if ($num != count($item))
{
$legend[$model->id] = $model->userName;
}
} //取出每个分类项 对应 的 学生数据.
$series = array(); foreach ($legend as $k => $v)
{
$cell = array();
$cell["name"] = $v; foreach ($item as $k2 => $v2)
{
$StudentAnalysisItemModel = new StudentAnalysisItemModel();
$where = " where studentId = $k and analysisItemId = $k2 ";
$StudentAnalysisItemModel->getDataRow($where); if ($StudentAnalysisItemModel->getDB)
{
$cell["value"][] = intval($StudentAnalysisItemModel->score);
}
else
{
$cell["value"][] = 0;
} } $series[] = $cell;
} $hasContent = empty($legend) ? 0 : 1; $content["hasContent"] = $hasContent;
$content["indicator"] = $indicator;
$content["legend"] = $legend;
$content["series"] = $series; return $content;
}

display方法:

     /**
* 显示页面
*
* @param unknown $parameter
* @param unknown $url
*/
protected function display($url, $parameter = array()) {
$path = pathinfo ( $url );
$location = CURR_VIEW_PATH . $path ["dirname"] . '/' . $path ["filename"] . 'Proxy' . '.' . $path ["extension"];
if (file_exists ( $location )) {
// 读取文件行数5.0以上版本
$fileProxy = fopen ( $location, 'r' );
$line = 0; // 初始化行数
while ( stream_get_line ( $fileProxy, 8192, "\n" ) ) {
$line ++;
}
fclose ( $fileProxy ); // 关闭文件 // 读取文件行数,效率低,适合5.0及5.0以下版本
// $line = count(file($location)); // 如果文件行数 大于一行,择跳转该文件
if ($line > 1) {
include $location;
} else {
include CURR_VIEW_PATH . $url;
}
} else {
include CURR_VIEW_PATH . $url;
}
}

2. 形式2. 网址.

 <iframe scrolling="yes" src="127.0.0.1/test/test.php" width="100%" height="100%" frameborder="0"></iframe>

3. 形式三  . 相对地址.

 <iframe scrolling="yes" src="./test/test.php" width="100%" height="100%" frameborder="0"></iframe>

<iframe> 标签 中 src 的三种形式. display , echart的更多相关文章

  1. Spring Framework5.0 学习(3)—— spring配置文件的三种形式

    Spring Framework  是 IOC (Inversion of Control  控制反转)原则的实践. IoC is also known as dependency injection ...

  2. CSS样式三种形式222

    markdown CSS基本表现形式只有三种:标签样式.Class类样式.ID样式 标签样式: 必须与HTML标签同名.仅仅影响同名标签 Class样式:可以在任何标签中使用: class=" ...

  3. CSS样式三种形式

    CSS基本表现形式只有三种:标签样式.Class类样式.ID样式 标签样式: 必须与HTML标签同名.仅仅影响同名标签 Class样式:可以在任何标签中使用: class="样式名" ...

  4. Jquery中each的三种遍历方法

    Jquery中each的三种遍历方法 $.post("urladdr", { "data" : "data" }, function(dat ...

  5. Qt学习 之 多线程程序设计(QT通过三种形式提供了对线程的支持)

    QT通过三种形式提供了对线程的支持.它们分别是, 一.平台无关的线程类 二.线程安全的事件投递 三.跨线程的信号-槽连接. 这使得开发轻巧的多线程Qt程序更为容易,并能充分利用多处理器机器的优势.多线 ...

  6. 【淡墨Unity3D Shader计划】五 圣诞用品: Unity在Shader三种形式的控制&amp;混合操作编译

    本系列文章由@浅墨_毛星云 出品,转载请注明出处. 文章链接:http://blog.csdn.net/poem_qianmo/article/details/42060963 作者:毛星云(浅墨)  ...

  7. c++中new的三种用法详细解析

    转载至: http://www.jb51.net/article/41524.htm 以下的是对c++中new的三种使用方法进行了详细的分析介绍,需要的朋友可以过来参考下,希望对大家有所帮助. 一. ...

  8. spring对事务支持的三种形式

    spring对事务支持的三种形式: 1.通过spring配置文件进行切面配置 <bean id="***Manager" class="org.springfram ...

  9. spring Bean配置的三种形式

    Spring Bean配置有以下三种形式: 传统的xml配置 Spring 2.5 以后新增注解配置 Spring3.0以后新增JavaConfig 1. 传统的xml配置 <?xml vers ...

随机推荐

  1. 括号生成(Java实现)

    题目: 给出 n 代表生成括号的对数,请你写出一个函数,使其能够生成所有可能的并且有效的括号组合. 例如,给出 n =3,生成结果为: [ "((()))", "(()( ...

  2. RESTful协议

    目的:在符合架构原理的前提下,理解和评估以网络为基础的应用软件的架构设计,得到一个功能强.性能好.适宜通信的架构 解决问题:如何开发在互联网环境中使用的软件,实现网站即软件 涉及主要元素 资源(Res ...

  3. og协议-有利于SNS网站分享

    一丶前言 全球快递toWhere官网发现使用og协议,并且支付宝和淘宝活动源码也会添加og协议,查阅资料弄清og协议是什么,此刻附上og协议官方文档 一丶什么是og协议 Open Graph通讯协定( ...

  4. mysql5.7.25安装

    附:mysql安装包 链接:https://pan.baidu.com/s/1vROdBSw0GiMWCRpuwmqFCg 提取码:ug4o a.运行mysql-installer-community ...

  5. 5、继承(extends)

    继承主要目的是提高代码的复用性,但是只有在类与类之间有所属关系的时候才能继承,不能为了获取其他类的功能而继承,Java中只有单继承,不支持多继承,但可以多层继承 当父类中定义了相同的功能,内容不同时, ...

  6. vue-cli webpack配置 简单分析

    vue-cli webpack配置分析 入口 从package.json可以看到开发和生产环境的入口. "scripts": { "dev": "no ...

  7. Django全文检索(django-haystack+whoosh+jieba)

    前言: 全文检索就是针对所有内容进行动态匹配搜索的概念,针对特定的关键词建立索引并精确匹配达到性能优化的目的 class Whoose_seach(object): analyzer = Chines ...

  8. ssh自动登入

    公司的服务器在国外,所以测试的查看日志的时候需要测试机,然后继续ssh 非常不方便,所以编写一个简单的ssh登入脚本 #!/usr/bin/expectset timeout 3spawn ssh n ...

  9. 输入一个字母,是元音字母,则输出时元音字母*,否则,输出为辅音字母 (元音字母有:a,e,i,o,u)

    import java.util.Scanner; public class test4 { public static void main(String[] args) { // TODO Auto ...

  10. 展示金额的方法(1元-->1.00元)

    public static String showMoneyByTwoDecimal(String account) { DecimalFormat doubleFormatter = new Dec ...