note 79250 added to function.curl-setopt
| From: | nico at nicoswd dot com | Date: | Sat, 17 Nov 2007 09:29:41 +0000 |
| Subject: | note 79250 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132367@lists.php.net to get a copy of this message | ||
Another small note on file uploads.
Specify the FULL path to the file.
<?php
$data = array(
'file' => '@C:/foo/bar/filename.ext',
'foo' => 'bar'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
?>
Something like:
<?php
$data = array('file' => '@filename.ext');
?>
...Didn't work for me.
----
Server IP: 80.64.47.13
Probable Submitter: 88.15.237.4
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- https://master.php.net/note/edit/79250
Del: integrated -- https://master.php.net/note/delete/79250/integrated
Del: useless -- https://master.php.net/note/delete/79250/useless
Del: bad code -- https://master.php.net/note/delete/79250/bad+code
Del: spam -- https://master.php.net/note/delete/79250/spam
Del: non-english -- https://master.php.net/note/delete/79250/non-english
Del: in docs -- https://master.php.net/note/delete/79250/in+docs
Del: other reasons-- https://master.php.net/note/delete/79250
Reject -- https://master.php.net/note/reject/79250
Search -- https://master.php.net/manage/user-notes.php