HTML form upload works, CURL fails when uploading file from c:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PHP 5.2.1 on Apache/Linux. Client is Firefox and IE7 on Windows XP.

Uploading C:\boot.ini works great from an HTML type="file" form element but fails using what should be the equivalent:
curl_setopt($ch,CURLOPT_POSTFIELDS,array('peru'=>'@C:/boot.ini'));

CURL error is "failed creating formpost data". Same CURL works when the test file resides on the PHP server:
curl_setopt($ch,CURLOPT_POSTFIELDS,array('peru'=>'@/home/user/boot.ini'));

so problem seems to be in the '@C:/boot.ini' filespec. Substituting '@C:\boot.ini' or '@C:\\boot.ini' doesn't help.

What am I doing wrong?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux