This commit is contained in:
wangjinlei
2024-11-01 15:40:39 +08:00
parent a6804ba463
commit 28a3c99ee3
3 changed files with 61 additions and 8 deletions

View File

@@ -251,7 +251,7 @@ function getAuthor($article) {
}
function pushSFTPForScopus($file)
function pushSFTPForScopus($file,$pdf_file)
{
$host = 'sftp-opsbank2.elsevier.com';
$port = 22; // SFTP 默认端口号
@@ -275,7 +275,13 @@ function pushSFTPForScopus($file)
$res = $sftp->put($remoteFile, $localFile, SFTP::SOURCE_LOCAL_FILE);
if ($res) {
//上传pdf
$localPdf = ROOT_PATH."public/articlePDF/".$pdf_file;
$remoteFilePdf = "/data/incoming/tmr/".str_replace(".xml",".pdf",$file);
$res1 = $sftp->put($remoteFilePdf,$localPdf,SFTP::SOURCE_LOCAL_FILE);
if ($res&$res1) {
echo "文件上传成功!";
} else {
var_dump($sftp);