php curl 번역 :
php 에서이 명령을 복제하려면 다음 단계를 따를 수 있습니다. URL 및 Filename의 동적 부분에 대한 변수 :
$ pageurl = "http : // HostName/@api/deki/pages/= testPage/files/="; $ filename = "test.png";curl -b cookie.txt -X PUT \ --data-binary "@test.png" \ -H "Content-Type: image/png" \ "http://hostname/@api/deki/pages/=TestPage/files/=test.png" \ -0
전체 url을 구성합니다 :
$ theurl = $ pageurl. $ filename;
컬 요청을 초기화합니다 :
curl -b cookie.txt -X PUT \ --data-binary "@test.png" \ -H "Content-Type: image/png" \ "http://hostname/@api/deki/pages/=TestPage/files/=test.png" \ -0$ ch = curl_init ($ theurl);
curl -b cookie.txt -X PUT \ --data-binary "@test.png" \ -H "Content-Type: image/png" \ "http://hostname/@api/deki/pages/=TestPage/files/=test.png" \ -0
원래 명령과 일치하려면 :
$ch = curl_init($theurl);); // -시간 // 강제 HTTP/1.0 버전 curl_setopt ($ ch, curlopt_http_version, curl_http_version_1_0); // -0
... (다음과 같은 추가 코드)
curl -b cookie.txt -X PUT \ --data-binary "@test.png" \ -H "Content-Type: image/png" \ "http://hostname/@api/deki/pages/=TestPage/files/=test.png" \ -0
부인 성명: 제공된 모든 리소스는 부분적으로 인터넷에서 가져온 것입니다. 귀하의 저작권이나 기타 권리 및 이익이 침해된 경우 자세한 이유를 설명하고 저작권 또는 권리 및 이익에 대한 증거를 제공한 후 이메일([email protected])로 보내주십시오. 최대한 빨리 처리해 드리겠습니다.
Copyright© 2022 湘ICP备2022001581号-3