相关疑难解决方法(0)

ftp_put 在传输后损坏了我的电影,这是错误的吗?

我有一堆电影正在尝试从我的 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)

php ftp

3
推荐指数
1
解决办法
1111
查看次数

标签 统计

ftp ×1

php ×1