feat(应用管理): 实现应用审核状态和日志系统
- 在app_store.sql中添加应用审核状态字段 - 重构日志系统到单独文件并实现日志分级 - 改进开发者注册和上传应用的错误处理和日志记录 - 为应用详情页添加评价分页加载功能 - 更新SMTP配置并增强邮件发送调试能力
This commit is contained in:
23
config.php
23
config.php
@@ -10,11 +10,12 @@ define('APP_STORE_NAME', 'LeonAPP');
|
||||
|
||||
// SMTP邮件配置
|
||||
define('SMTP_HOST', 'smtp.163.com');
|
||||
define('SMTP_PORT', 25);
|
||||
define('SMTP_USER', 'leonmmcoset@qq.com');
|
||||
define('SMTP_PASSWORD', 'CXaWtRdekFAabUWZ');
|
||||
define('SMTP_FROM', 'leonmmcoset@qq.com');
|
||||
define('SMTP_FROM_NAME', 'LeonAPP 验证系统');
|
||||
define('SMTP_PORT', 25); // 163邮箱推荐使用587端口
|
||||
define('SMTP_ENCRYPTION', 'tls'); // 启用TLS加密
|
||||
define('SMTP_USERNAME', 'leonmmcoset@163.com'); // 使用完整邮箱地址作为用户名
|
||||
define('SMTP_PASSWORD', 'YFgYVFn6ZaVY9qiV');
|
||||
define('SMTP_FROM_EMAIL', 'leonmmcoset@163.com');
|
||||
define('SMTP_FROM_NAME', 'leonmmcoset@163.com');
|
||||
|
||||
// 管理员账号
|
||||
define('ADMIN_USERNAME', 'Admin');
|
||||
@@ -33,15 +34,5 @@ $conn->set_charset('utf8mb4');
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
|
||||
// 错误日志记录函数
|
||||
function log_error($message, $file = '', $line = '') {
|
||||
$log_entry = date('[Y-m-d H:i:s]') . ' Error: ' . $message;
|
||||
if (!empty($file)) {
|
||||
$log_entry .= ' in ' . $file;
|
||||
}
|
||||
if (!empty($line)) {
|
||||
$log_entry .= ' on line ' . $line;
|
||||
}
|
||||
$log_entry .= "\n";
|
||||
file_put_contents('d:\\app2\\logs\\error.log', $log_entry, FILE_APPEND);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user