略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: RRDUpdater::update

2024-11-15

RRDUpdater::update

(PECL rrd >= 0.9.0)

RRDUpdater::updateUpdate the RRD database file

说明

public RRDUpdater::update(array $values, string $time = time() ): bool

Updates the RRD file defined via RRDUpdater::__construct(). The file is updated with a specific values.

参数

values

Data for update. Key is data source name.

time

Time value for updating the RRD with a particular data. Default value is current time.

返回值

成功时返回 true, 或者在失败时返回 false

错误/异常

Throws a Exception on error.

范例

示例 #1 RRDUpdater::update() examples

<?php
$updator 
= new RRDUpdater("speed.rrd");
//updates the data source "speed" with value "12411"
//for time defined by timestamp "920807700"
$updator->update(array("speed" => "12411"), "920807700");
?>
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/rrdupdater.update.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3