我正在使用 PHP 版本 5.6 。我制作了一個(gè) PHP 表單,有 3 個(gè)字段:用戶名、密碼和 CSV 文件上傳。CSV 文件每行包含兩個(gè)“數(shù)字代碼”,票號(hào)和發(fā)票號(hào)除以“;” ,這樣 CSV 有兩列。在我編寫的處理代碼中,我編寫了逐行讀取 CSV 文件并將票號(hào)和發(fā)票號(hào)分解為兩個(gè)變量的代碼。之后,代碼生成需要通過(guò) GenericTicketConnectorSOAP 發(fā)送的 XML 數(shù)據(jù)并執(zhí)行票證更新。我的 php 代碼如下:$URL = 'http://localhost/otrs/nphgenericinterface.pl/Webservice/GenericTicketConnectorSOAP';$NameSpace = 'http://www.otrs.org/TicketConnector/'; // SOAP parameters $parameters = ['proxy_host' => $URL,'proxy_port' => 8080,'stream_context' => stream_context_create(array('ssl' => array('verify_peer' => false,'verify_peer_name' => false,)))];// More code that it is not necessary to post it//Posting the code that the problem starts if(move_uploaded_file($_FILES['file']['tmp_name'],($path . $newfilename))){echo '<div class="alert alert-primary" role="alert"><p>Success: File uploaded.</p></div>'; $fn = fopen($path . $newfilename,"r"); while(! feof($fn) ) { $content = fgets($fn); // Divide the ticket number and the invoice number into two variables list($ticketnumber,$invoicenumber) = explode(";", $content); echo "TicketNumber: ".$ticketnumber." Invoicenumber: ".$invoicenumber; // Making XMLData
1 回答

HUH函數(shù)
TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超4個(gè)贊
通過(guò)在 php.ini 文件中添加以下行解決了該問(wèn)題:
ini_set('soap.wsdl_cache_enabled', '0'); ini_set('soap.wsdl_cache_ttl', '0');
- 1 回答
- 0 關(guān)注
- 131 瀏覽
添加回答
舉報(bào)
0/150
提交
取消