Files
Qiniu/php-sdk/examples/qetag.php
2026-02-23 19:48:13 +08:00

15 lines
312 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
require_once __DIR__ . '/../autoload.php';
use Qiniu\Etag;
// 计算文件的 ETag
// 参考文档https://developer.qiniu.com/kodo/manual/1231/appendix#3
$localFile = "./php-logo.png";
list($ret, $err) = Etag::sum($localFile);
if ($err != null) {
var_dump($err);
} else {
echo "Etag: $ret";
}