本文整理匯總了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;