均哥分享

Bat批处理实现文件本地传送到FTP上

2020-04-14 13:32:37 admin 30

本人写的例子:

@echo off
 echo open 119.23.*.* >> temp.txt
 echo user 这里写您的FTP帐号 这里写您的FTP密码>> temp.txt
 echo bin >> temp.txt
 echo put "D:\Guodejun Private Files_guodejun\update\current stock list.xlsx" "web/website/jibuzhen/achteck/current stock list.xlsx" >> temp.txt
 echo bye >> temp.txt
 ftp -n -s:"temp.txt"
 del /q temp.txt
 pause


服务器上写PHP获取文件时间 

<?php
echo "<div align='center'><br><br><br><br><br>";
// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23.
$filename = 'current stock list.xlsx';
if (file_exists($filename)) {
 echo "$filename was updated: " . date ("F d Y H:i:s.", filemtime($filename));
 }
 echo " <br> <a href='http://***/current stock list.xlsx'>Click here to download current stock list</a>";
 echo "</div>";
?>


首页
分享
日志
联系