摘要: php异常处理的一般格式: try if(false){ //在预估会出错的地方设置并抛出异常 throw new Exception("出错了"); } }catch(Exception $e){ $str = '捕获到错误:'; $str .= $e->getMessage(); $str .= 阅读全文
posted @ 2020-07-30 22:35 孤舟残月浅笑嫣然 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 文件calender.class.php: <?php /* file: calendar.class.php日历类原文件 声明一个日历类,名称为calenar,用来显示一个可以设置日期的日历 */ class Calendar{ private $year; //当前的年 private $mon 阅读全文
posted @ 2020-07-30 13:46 孤舟残月浅笑嫣然 阅读(307) 评论(0) 推荐(0) 编辑