Created
October 16, 2014 22:21
-
-
Save JoelMarcey/ae01505b8a382ed02473 to your computer and use it in GitHub Desktop.
CURLFile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $file = new CurlFile(__DIR__. '/curl_testdata1.txt'); | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file)); | |
| curl_exec($ch); | |
| var_dump($file->name); | |
| var_dump($file->postname); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment