В настоящее время у меня есть код, который перечисляет файлы в определенном каталоге, поэтому я считаю, что этот код
Код: Выделить всё
// Will do a PUT request with a request body
$response = $client->request('PUT', 'file.txt', "New contents");
Код: Выделить всё
//$response = $client->request('PUT', 'A87J8HRS1 - simple pdf.pdf', "Test PDF.pdf");
Код: Выделить всё
HP Fatal error: Uncaught Sabre\HTTP\ClientException: URL rejected: Malformed input to a URL function in D:\data\projects\erp\scripts\php\vendor\sabre\http\lib\Client.php:327
Stack trace:
#0 D:\data\projects\erp\scripts\php\vendor\sabre\http\lib\Client.php(114): Sabre\HTTP\Client->doRequest()
#1 D:\data\projects\erp\scripts\php\vendor\sabre\dav\lib\DAV\Client.php(423): Sabre\HTTP\Client->send()
#2 D:\data\projects\erp\scripts\php\webDAV-listFiles.php(69): Sabre\DAV\Client->request()
#3 {main}
thrown in D:\data\projects\erp\scripts\php\vendor\sabre\http\lib\Client.php on line 327
$response = $client->request('PUT', 'upload/A87J8HRS1.pdf', file_get_contents('A87J8HRS1 - simple pdf.pdf'));
Код: Выделить всё
:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
Sabre\DAV\Exception\NotFound
Principal with name upload not found
Код: Выделить всё
// $response = $client->request('PUT', '/upload/A87J8HRS1.pdf', file_get_contents('A87J8HRS1 - simple pdf.pdf'));
// $response = $client->request('PUT', '/A87J8HRS1.pdf', file_get_contents('A87J8HRS1 - simple pdf.pdf'));
Подробнее здесь: https://stackoverflow.com/questions/792 ... dav-client
Мобильная версия