Php 如何知道文档的大小

Php 如何知道文档的大小,php,json,Php,Json,我必须从github下载json文档,但目前我不知道为什么我的缓存文件中有一个大小为0的文档。 我想知道是否有可能将文档保存在缓存中以了解大小 传统知识 这是代码的一部分 $file_link = $content_download_file->download_url; $file_json_content = file_get_contents($file_link, true, $this->context); ===> possible to know thesiz

我必须从github下载json文档,但目前我不知道为什么我的缓存文件中有一个大小为0的文档。 我想知道是否有可能将文档保存在缓存中以了解大小

传统知识

这是代码的一部分

$file_link = $content_download_file->download_url;

$file_json_content = file_get_contents($file_link, true, $this->context);

===> possible to know thesize here  of $file_json_content ?

file_put_contents($this->saveFileIntoCacheFilesTemp . '/' . $module_name, $file_json_content);
可能是重复的我会看
strlen($file\u json\u content)作为一个JSON字符串实际上只是一个字符串