当前位置: 首页>>代码示例>>PHP>>正文


PHP create_image1函数代码示例

本文整理汇总了PHP中create_image1函数的典型用法代码示例。如果您正苦于以下问题:PHP create_image1函数的具体用法?PHP create_image1怎么用?PHP create_image1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了create_image1函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create_image1

<?php

// Graphs Package V2.1 16th March 2008
if (!file_exists("graphsconf.php")) {
    include "error_msg.php";
}
include "graphsconf.php";
if (!file_exists($jploc . "jpgraph.php")) {
    $string = "Unable to find JPGraph files";
    create_image1($string, $jploc);
    exit;
}
include $jploc . "jpgraph.php";
include $jploc . "jpgraph_line.php";
$clientraw = get_raw("{$hostloc}clientraw.txt");
// Create aray for y-axis
$y = array();
$y = array($clientraw['80'], $clientraw['81'], $clientraw['82'], $clientraw['83'], $clientraw['84'], $clientraw['85'], $clientraw['86'], $clientraw['87'], $clientraw['88'], $clientraw['89']);
$datay = $y;
if ($speed_conv != 1) {
    array_walk($datay, "KtoV");
}
//create timearray for the x-axis
$crhour = $clientraw[29];
$crmin = $clientraw[30];
$crhour = $crhour - 1;
if ($hourmode == "24") {
    if ($crhour == -1) {
        $crhour = 23;
    }
    $hr_pad = "0";
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:windspeed_60min.php

示例2: get_raw

function get_raw($rawfile)
{
    if (substr($rawfile, 0, 7) != "http://") {
        if (!file_exists($rawfile)) {
            $string = "Unable to find";
            create_image1($string, $rawfile);
            exit;
        }
    }
    $rawdata = array();
    $fd = fopen($rawfile, "r");
    if ($fd) {
        $rawcontents = '';
        while (!feof($fd)) {
            $rawcontents .= fread($fd, 8192);
        }
        fclose($fd);
        $delimiter = " ";
        $rawdata = explode($delimiter, $rawcontents);
    } else {
        $rawdata[0] = -9999;
    }
    return $rawdata;
}
开发者ID:shakaran,项目名称:weatherpro,代码行数:24,代码来源:graphsconf-metric.php


注:本文中的create_image1函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。