trycatche

<?php
header("Content-type: text/html; charset=utf-8");

try{
$aaa = 0;
if ($aaa == 9) {
echo 9999;
} else {
throw new Exception('file is not exists');
}
} catch (Exception $e) {
print $e->getMessage();
exit();
}
?>

原文地址:https://www.cnblogs.com/yszr/p/8819553.html