솔루션 :
$ data = array ( 'name'=> 'ross', 'php_master'=> true); // @로 접두사로 파일을 게시 할 수 있습니다 ( fields) $ data
= '@/home/user/world.jpg'; $ hone = curl_init ($ url); curl_setopt ($ hands, curlopt_post, true); curl_setopt ($ hands, curlopt_postfields, $ data); curl_exec ($ 핸들); curl_close ($ hands);설명 :
$data = array('name' => 'Ross', 'php_master' => true); // You can POST a file by prefixing with an @ (for fields) $data['file'] = '@/home/user/world.jpg'; $handle = curl_init($url); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); curl_exec($handle); curl_close($handle);
부인 성명: 제공된 모든 리소스는 부분적으로 인터넷에서 가져온 것입니다. 귀하의 저작권이나 기타 권리 및 이익이 침해된 경우 자세한 이유를 설명하고 저작권 또는 권리 및 이익에 대한 증거를 제공한 후 이메일([email protected])로 보내주십시오. 최대한 빨리 처리해 드리겠습니다.
Copyright© 2022 湘ICP备2022001581号-3