Zmiany pomiędzy wersją 9 and wersją 10 dla DeployerGuide/Others/eDokumentyApi

Pokaż
Ignoruj:
Data i czas:
02/11/11 12:08:04 (13 years temu)
Autor:
TS (IP: 213.227.67.33)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • DeployerGuide/Others/eDokumentyApi

    v9 v10  
    363363    if ($doc_id) { 
    364364        try { 
    365             $file = base64_encode(file_get_contents('test.pdf')); 
    366             $fname = 'test.pdf'; 
     365            $filePath = './test.pdf'; 
     366            $content = base64_encode(file_get_contents(filePath)); 
    367367             
    368             $dd = $client->addAttachmentToDocument($file, $fname, $doc_id); 
     368            $dd = $client->addAttachmentToDocument($content, basename(filePath), $doc_id); 
    369369            var_dump($dd); 
    370370         
     
    380380} 
    381381 
     382// zwraca dane (tablica) o sprawie wszystko z tabeli processes gdzie prc_id = $prc_id 
     383try { 
     384 
     385    $data = $client->getProcess($prc_id); 
     386    var_dump($data); 
     387 
     388} catch(SoapFault $fault) { 
     389     
     390    var_dump($fault); 
     391     
     392    if ($fault->faultcode < 100) { 
     393        trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR); 
     394    } 
     395} 
     396 
    382397?> 
    383398}}}