PHP fopen 错误捕获

函数2020.04.05发生异常,导致程序异常退出php进程 function down($filename){ $handle = fopen($filename, "r"); $contents = ""; do { $data = fread($handle, 8192); if (strlen($data) == 0) { break; } $contents .= $data; } while(true); fclose($handle); return $contents; } 状态查询:nginx 自身有 More