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


PHP get_raw函数代码示例

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


在下文中一共展示了get_raw函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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_bar.php";
$clientrawdaily = get_raw("{$hostloc}clientrawdaily.txt");
//Setup Y data
$y = array();
$y = array($clientrawdaily['94'], $clientrawdaily['95'], $clientrawdaily['96'], $clientrawdaily['97'], $clientrawdaily['98'], $clientrawdaily['99'], $clientrawdaily['100'], $clientrawdaily['101'], $clientrawdaily['102'], $clientrawdaily['103'], $clientrawdaily['104'], $clientrawdaily['105'], $clientrawdaily['106'], $clientrawdaily['107'], $clientrawdaily['108'], $clientrawdaily['109'], $clientrawdaily['110'], $clientrawdaily['111'], $clientrawdaily['112'], $clientrawdaily['113'], $clientrawdaily['114'], $clientrawdaily['115'], $clientrawdaily['116'], $clientrawdaily['117'], $clientrawdaily['118'], $clientrawdaily['119'], $clientrawdaily['120'], $clientrawdaily['121'], $clientrawdaily['122'], $clientrawdaily['123'], $clientrawdaily['124']);
$datay = $y;
if ($pres_conv != 1) {
    array_walk($datay, "HtoI");
}
//=================================================================================================
//here we create the labels for the x-axis depending month and year
//so if we are in March we must show the last day of Feb normally 28 or 29 and the following
//label must be 01
//same for moths with 30 days (last day = 30 next label must be 01 and not 31
//we need 31 labels because we have 31 datapoints
//==================================================================================================
$month = date("m");
$year = date("y");
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:month_baro.php

示例3: get_date

function get_date($rawfile)
{
    global $hostloc;
    global $hourmode;
    $clientraw = get_raw("{$hostloc}clientraw.txt");
    $rawdata = $clientraw[29];
    $rawdata = $rawdata - 1;
    if ($hourmode == "24") {
        if ($rawdata == -1) {
            $rawdata = 23;
        }
        if ($rawdata < 10) {
            $rawdata = "0" . $rawdata;
        }
    }
    if ($hourmode == "12") {
        if ($rawdata >= 13) {
            $rawdata = $rawdata - 12;
        }
        if ($rawdata == -1) {
            $rawdata = 11;
        }
        if ($rawdata == 0) {
            $rawdata = 12;
        }
    }
    return $rawdata;
}
开发者ID:shakaran,项目名称:weatherpro,代码行数:28,代码来源:graphsconf-metric.php

示例4: 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_bar.php";
$clientrawextra = get_raw("{$hostloc}clientrawextra.txt");
$y = $clientrawextra['484'] + $clientrawextra['485'] + $clientrawextra['486'] + $clientrawextra['487'] + $clientrawextra['488'] + $clientrawextra['489'] + $clientrawextra['490'];
$y = $y / 10;
$y = array($y);
$datay = $y;
if ($rain_conv != 1) {
    array_walk($datay, "MtoI");
}
// Setup the graph.
$graph = new Graph($xsize1, $ysize, "auto");
$graph->SetScale("textlin");
$graph->yscale->SetGrace(10);
$graph->SetMargin($lm1, $rm1, $tm1, $bm1);
$graph->SetShadow();
$graph->SetMarginColor("{$margincolour}");
//Setup Mian Title
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 8);
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:rain_week.php

示例5: 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";
$clientrawhour = get_raw("{$hostloc}clientrawhour.txt");
$process_hour = get_date("{$hostloc}clientrawhour.txt");
// Here we create an array of the values we need depending of the day of the week we are in (each month we shift to the left 1 place)
$x = array();
$y = array();
$ii = 0;
$jj = 1;
while ($ii < 60) {
    $y[$ii] = $clientrawhour[$jj];
    $ii = $ii + 1;
    $jj = $jj + 1;
}
$datay = $y;
if ($speed_conv != 1) {
    array_walk($datay, "KtoV");
}
//With this-one we calculate the labels for the x-axis
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:windspeed_1hr.php


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