亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 PHP 中正確使用 OTRS GenericTicketConnectorSOAP

如何在 PHP 中正確使用 OTRS GenericTicketConnectorSOAP

PHP
鳳凰求蠱 2023-08-11 17:20:52
我正在使用 PHP 版本 5.6 。我制作了一個 PHP 表單,有 3 個字段:用戶名、密碼和 CSV 文件上傳。CSV 文件每行包含兩個“數字代碼”,票號和發票號除以“;” ,這樣 CSV 有兩列。在我編寫的處理代碼中,我編寫了逐行讀取 CSV 文件并將票號和發票號分解為兩個變量的代碼。之后,代碼生成需要通過 GenericTicketConnectorSOAP 發送的 XML 數據并執行票證更新。我的 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函數

TA貢獻1836條經驗 獲得超4個贊

通過在 php.ini 文件中添加以下行解決了該問題:

ini_set('soap.wsdl_cache_enabled', '0'); 
ini_set('soap.wsdl_cache_ttl', '0');


查看完整回答
反對 回復 2023-08-11
  • 1 回答
  • 0 關注
  • 121 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號