gpt4 book ai didi

php 同一图像的不同哈希值

转载 作者:搜寻专家 更新时间:2023-10-31 22:12:12 25 4
gpt4 key购买 nike

我有两个相同的图像存储在两个不同的服务器(保管箱和我自己的)。然而,我意识到

hash("md5",file_get_contents($image1))
hash("md5",file_get_contents($image2))

为这些相同的图像返回不同的哈希值。我如何确保它们都返回相同的字符串?

最佳答案

您是否考虑过使用 md5_file?

md5_file($image1);
md5_file($image2);

http://www.php.net/manual/en/function.md5-file.php

关于php 同一图像的不同哈希值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11694533/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com