php file_exists() 函数可以检测数小文件,检测不出大文件,求解

//        $res = $this -> pdfImgMore($_SERVER['DOCUMENT_ROOT'].'/upload/222222.pdf');
//        $res = $this -> pdfImgMore($_SERVER['DOCUMENT_ROOT'].'/upload/111111.pdf');
        $res = $this -> pdfImgMore('/home/wwwroot/Magazine/public/upload/456.pdf');
//        $res = $this -> pdfImgMore('/home/wwwroot/Magazine/public/upload/pdf/2021/04/19/123.pdf');
//        $res = $this -> pdfImgMore('/home/wwwroot/Magazine/public/upload/pdf/123.pdf');
//        $res = $this -> pdfImgMore('/home/wwwroot/Magazine/123.pdf');
        dd($res);
    }

如果文件非常大,则使用file_exists()函数检查其存在性可能需要很长时间。在这种情况下,最好使用其他函数(如stat()或fopen())来检查文件的元数据或打开文件进行读取。