Home  >  Article  >  Backend Development  >  PHP downloads remote files to the specified directory

PHP downloads remote files to the specified directory

angryTom
angryTomforward
2019-10-16 09:30:203302browse

PHP用curl可以轻松实现下载远程文件到指定目录:

推荐学习:PHP视频教程

 0) {
           if ( ! mkdir($dir , $mode)) {
              return false;
           }
           if ( ! chmod($dir , $mode)) {
              return false;
           }
        }
     }
     return true;
   }
}

The above is the detailed content of PHP downloads remote files to the specified directory. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.awaimai.com. If there is any infringement, please contact admin@php.cn delete