note 78733 deleted from function.curl-setopt by felipe
| From: | felipe@php.net | Date: | Sun, 16 Dec 2007 11:37:09 +0000 |
| Subject: | note 78733 deleted from function.curl-setopt by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133669@lists.php.net to get a copy of this message | ||
Note Submitter: patrick fournier
Reason: 5
----
If you pass a string as the argument to CURLOPT_POSTFIELDS, your data will be interpreted as
x-www-form-urlencoded; if you pass an array, it will be interpreted as multi-part form-data.
So if you want to upload a file:
- pass an array to CURLOPT_POSTFIELDS
- do not urlencode your data
- put a @ in front of your file name.