58596061626364656667686970717273747576
return getcwd() . $file;
}
}
//查找文章
$model = Article::findOne($file);
if($model == null || empty($model['attach_file'])){
$this->_error('attach not have');
}
$ResArr = Resource::findone(['path'=>$model['attach_file']])->toarray();
$ResName = $ResArr['title'].'.'.$ResArr['file_type'];
if(in_array($ResArr['file_type'], ['pdf'])){
$this->downloadPdf($ResArr['path'],$ResArr['title']);
}
$filesrc = $model['attach_file'];
$dirFilesrc = getcwd() . $filesrc;
return [$dirFilesrc,$ResName];