我有一堆电影正在尝试从我的 CentOS 服务器传输到我的 Windows PC 上。但是当我通过这个脚本运行它们时,它们最终会被损坏。是不是剧本有什么问题?
谢谢
$allFiles = glob("/var/www/html/ftp_pending/*");
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
foreach($allFiles as $singleFile)
{
// check if a file exist
$path = "/"; //the path where the file is located
$file = substr( $singleFile, strrpos( $singleFile, '/' )+1 );
$check_file_exist = $path.$file; //combine string for easy use
// Returns an array of filenames from the specified directory on success or
// …Run Code Online (Sandbox Code Playgroud)