PHP运行之后无法正常显示页面
New
2025-7-3 20:53 来自
浅生 发布 @ Discuz! X3.5专区
- <?php if(!defined('IN_DISCUZ')) { exit('Access Denied'); } global $_G; class plugin_w0504_ym { protected $config; protected $api_key; protected $api_url; protected $api_model; public function __construct() { // 从插件配置获取环境变量 $this->config = C::t('common_setting')->fetch('w0504_ym_config'); $this->api_key = $this->config ?? ''; $this->api_url = $this->config ?? 'https://openrouter.ai/api/v1'; $this->api_model = $this->config ?? 'deepseek/deepseek-r1:free'; } // 公共方法供全局作用域调用 public function check_api_key() { return !empty($this->api_key); } // 发送消息处理 public function send_message() { $message = dhtmlspecialchars(trim(
复制代码
免责声明:
DZ插件网AI平台旨在开源共享精神,请勿发布敏感信息,任何违法信息我们将移交公安机关;