<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/include/common.php'; // 使用绝对路径，引入数据库连接文件

// 定义常量
if (isset($apiCredentials['txyunsms_signname'], $apiCredentials['txyunsms_secretid'], $apiCredentials['txyunsms_secretkey'], $apiCredentials['txyunsms_appid'], $apiCredentials['txyunsms_notice1'], $apiCredentials['txyunsms_notice2'], $apiCredentials['txyunsms_notice3'], $apiCredentials['txyunsms_notice4'])) {
    // 使用 const 定义常量
    define('txyunsms_signname', $apiCredentials['txyunsms_signname']); 
    define('txyunsms_secretid', $apiCredentials['txyunsms_secretid']); 
    define('txyunsms_secretkey', $apiCredentials['txyunsms_secretkey']); 
    define('txyunsms_appid', $apiCredentials['txyunsms_appid']); 
    define('txyunsms_notice1', $apiCredentials['txyunsms_notice1']); 
    define('txyunsms_notice2', $apiCredentials['txyunsms_notice2']); 
    define('txyunsms_notice3', $apiCredentials['txyunsms_notice3']); 
    define('txyunsms_notice4', $apiCredentials['txyunsms_notice4']); 
} else {
    throw new Exception("API credentials not found."); // 如果没有找到，则抛出异常
}
?>
