ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
​ 文件目录提前创建好,并给足权限,就可以用了 ~~~php public function fengxi_elebaodantest($policyNo='6613530113306210000002') { $result = Http::get($this->fx_baoelebaodan.'?policyNo='.$policyNo.'&accessKey='.$this->fx_accessKey.'&accessSecret='.$this->fx_accessSecret); $path="/www/wwwroot/***/***/public/static/fengqi/fengqi".$policyNo.".pdf"; $realpath='/static/fengqi/fengqi'.$policyNo.".pdf"; $ret=file_put_contents($path,$result); if($ret){ return $realpath; }else{ return false; } } ~~~ ![](data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== "点击并拖拽以移动") ​