AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
```php function getImageAttr($image) { //判断图片路径是否完整 if (stripos($image, 'http') === 0 || $image === '' || stripos($image, 'data:image') === 0) { $image = $image; } else { //获取配置的上传域名 $upload = \think\Config::get('upload'); if (!empty($upload['cdnurl'])) { $image = $upload['cdnurl'] . $image; } else { //自动获取域名并拼接 $http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://'; $image = $http_type . $_SERVER['HTTP_HOST'] . $image; } } return $image; } ```