通过远程表单使用CURL + PHP上传图像

时间:2010-05-18 01:02:34

标签: php curl

我需要使用在线表单上传一些图片。 到目前为止这是我的代码

$info = array('test title','1234','virginia','@'.realpath('e:\wamp\www\1.jpg'),'@'.realpath('e:\wamp\www\2.jpg'),'@'.realpath('e:\wamp\www\3.jpg'),'@'.realpath('e:\wamp\www\4.jpg'),'test description');
$post->postAd($url, $info);

$ info数组在postAd方法中处理,并且它使用我所拥有的Curl类中的方法作为关联数组发送(它已经过测试,并且很好地处理了迄今为止我需要用curl做的所有事情)。 问题是数据在表单上正确完成但图像没有上传。