zoukankan      html  css  js  c++  java
  • 利用 PHP CURL zip压缩文件上传

    $postData['file'] = "@".getcwd()."/../attachment/qianbao/{$customer_id}.zip";
    
    $this->log->info("Qianbao file path:".$postData['file']);
    //$postData['sign'] = bin2hex(md5($str_sign)); //'file' => '@d:usrwww	ranslatedocumentReadme.txt'
    //$postData['file'] = "@d:homeoraclexpay-1.0.0attachmentqianbao{$customer_id}.zip";
    
    $postData['sign'] = md5($str_sign);
    
    
    $this->log->info("Qianbao Sign:".$postData['sign']);
    
    $postUrl = "http://www.happygrp.com/agent/merchant/import";//生产
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $postUrl);
    curl_setopt($curl, CURLOPT_USERAGENT,'Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15');
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // stop verifying certificate
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POST, true);
    //curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
    curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $r = curl_exec($curl);
    $e = curl_error($curl);
    curl_close($curl);
    

      

  • 相关阅读:
    魔兽世界祭拜长者
    Mono嵌入C++
    kxb-shell文件操作-kxb
    GAN初步理解
    Pytorch 常用函数方法的理解
    转载:StyleGAN & StyleGAN2 论文解读
    RepVGG
    多目标跟踪,REID, JDE跟踪器解析
    卷积和反卷积详细说明
    FairMOT解析
  • 原文地址:https://www.cnblogs.com/wanglijun/p/9680061.html
Copyright © 2011-2022 走看看