php自动加载类使用: 目录结构 index的代码展示 <?php header("Content-type:text/html;charset=utf-8"); //设置框架编码 ini_set("date.timezone", "Asia/Shanghai");//设置 时间区域 const APP_PATH = __DIR__ . '/';//定义我们的项 目路径常量 const Lib = '../PHPmm/';