<?php
// 系统配置
define('WEBSITE', [
    'ROOT'    => str_replace('\\', '/', dirname(__DIR__)),           // 网站根目录
    'LINPHP'  => str_replace('\\', '/', dirname(dirname(__DIR__))),  // 框架目录
    'VIEW'    => ['module', 'view','data','api'],           // 视图目录列表
    'MIME'    => ['html', 'htm', 'php', 'json']                      // 支持文件后缀
]);
// 配置数据库,不使用默认数据库
define('DB', [
    'TYPE' => 'mysql',
    'NAME' => 'wsy',
    'HOST' => '127.0.0.1',
    'USERNAME' => 'wsy',
    'PASSWORD' => 'Aa@linqijing2025'
]);

require WEBSITE['LINPHP'] . '/LinPHP/LinPHP.php'; //框架入口文件
require WEBSITE['ROOT']   . '/core/Config.php';   //网站配置

$page     = $Lin->PN('page', '3', '0', '分页必须是数字并且不能为空！') ?: 1;
$limit    = $Lin->PN('limit', '3', '0', '页数必须是数字') ?: Site_Limit;
$debug    = $Lin->PN('debug', '3', '0', 'debug');

define('page',  $page);
define('limit', $limit); //定义全局
define('debug', $debug); //定义全局
define('HtmlID',$Lin->random(8));
//limit
?>