I try to load the excel file into one web application, I do this (it does not return any errors, but the array does not come back, which should come):
$this->headers = [ "Content-Type: multipart/form-data", "Referer: http://domain.com/hand.html", "Origin: http://domain.com", "UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" ]; $post = [ "file" => curl_file_create ("../../test.xlsx"), "name" => "test.xlsx", "name" => "test.xlsx" ]; $this->curl = curl_init ($url); curl_setopt ($this->curl, CURLOPT_RETURNTRANSFER, true); curl_setopt ($this->curl, CURLOPT_HTTPHEADER, $this->headers); curl_setopt ($this->curl, CURLOPT_POST, true); curl_setopt ($this->curl, CURLOPT_POSTFIELDS, $post); $result = curl_exec ($this->curl); curl_close ($this->curl); $json = json_decode ($result, true); return $json;