note 108659 added to function.curl-setopt

From: Date: Tue, 15 May 2012 16:22:48 +0000
Subject: note 108659 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-187991@lists.php.net to get a copy of this message
In response to the note above about sending the full path name when posting a file: <?php curl_setopt($ch, CURLOPT_POSTFIELDS, array('file' => '@/path/to/file.ext'); ?> Rather than changing the current directory, you can specify an alternate pathname like so: <?php curl_setopt($ch, CURLOPT_POSTFIELDS, array('file' => '@/path/to/file.ext;filename=different_name.ext'); ?> ---- Server IP: 192.41.42.26 Probable Submitter: 68.42.88.41 ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- https://master.php.net/note/edit/108659 Del: integrated -- https://master.php.net/note/delete/108659/integrated Del: useless -- https://master.php.net/note/delete/108659/useless Del: bad code -- https://master.php.net/note/delete/108659/bad+code Del: spam -- https://master.php.net/note/delete/108659/spam Del: non-english -- https://master.php.net/note/delete/108659/non-english Del: in docs -- https://master.php.net/note/delete/108659/in+docs Del: other reasons-- https://master.php.net/note/delete/108659 Reject -- https://master.php.net/note/reject/108659 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187991) next »