本文整理汇总了PHP中box::input方法的典型用法代码示例。如果您正苦于以下问题:PHP box::input方法的具体用法?PHP box::input怎么用?PHP box::input使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类box
的用法示例。
在下文中一共展示了box::input方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: box
<?php
$time = $_GET[option];
//$time = "20131007";
exec("/bin/cat /mnt/tclog/total_{$time}", $traffic);
$go = new box();
foreach ($traffic as $value) {
if ($value) {
$input = explode(",", $value);
$time = explode("-:", $input[0]);
for ($i = 1; $i < count($input); $i++) {
$name = explode("-", $input[$i]);
$low = $go->input($time[1], $name[1]);
$boxbig[$name[0]][0] .= $low . ",";
}
}
}
foreach ($boxbig as $key => $value) {
if ($key != '' && $value != '') {
$data .= $key . "-:" . $value[0] . ":";
}
}
//echo print_r($boxbig);
echo $go->debug($data);
class box
{
function input($box, $str)
{
//$tmp_box=$box.",".$str;
$tmp_box = $str;
return $tmp_box;
示例2: exec
exec("/bin/cat /mnt/tclog/total_{$data_1}", $traffic);
$go = new box();
foreach ($traffic as $value) {
if ($value) {
$input = explode(",", $value);
$time = explode("-:", $input[0]);
for ($i = 1; $i < count($input); $i++) {
$name = explode("-", $input[$i]);
if ($name[0] != '') {
$total[$name[0]] += $name[1];
}
}
}
}
foreach ($total as $key => $dd) {
$low = $go->input($date_format, $dd);
$boxbig[$key][0] .= $low . ",";
}
}
//echo $go->debug($boxbig);
foreach ($boxbig as $key => $value) {
$data_2 .= $key . "-:" . $value[0] . ":";
}
//echo print_r($boxbig);
echo $go->debug($data_2);
class box
{
function input($box, $str)
{
//$tmp_box=$box.",".$str;
$tmp_box = $str;