wupengfei 2 years ago
parent
commit
7adbc22058
2 changed files with 5 additions and 4 deletions
  1. 0 1
      .idea/workspace.xml
  2. 5 3
      application/common.php

+ 0 - 1
.idea/workspace.xml

@@ -2,7 +2,6 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />

+ 5 - 3
application/common.php

@@ -349,9 +349,11 @@ function pdfCurl($file_name)
     curl_setopt($ch, CURLOPT_POSTFIELDS, ['file'=>new \CURLFile(realpath($file_name))]);
     $headers = array();
 
-    $headers[] = 'Content-Type: application/x-www-form-urlencoded';
-    $headers[] = 'Content-Type: multipart/form-data';
-    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+//    $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+//    $headers[] = 'Content-Type: multipart/form-data';
+//    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+    $info = curl_getinfo($ch);
+    dump($info);
     $result = curl_exec($ch);
     if (curl_errno($ch)) {
         echo 'Error:' . curl_error($ch);