开发者

php escape method , php curl picture upload

I'm trying to upload some pictures using php cURL but the issue is that the names of the pictures are very weird . Basically they contain #$% signs like this

!Bw5kO2w!mk~$(KGrHqQOKjwEv开发者_运维知识库qEtNICrBMLHRIcc+!~~_1.JPG

The picture name is retrieved dynamically so I don't know how to escape the characters.

 $image = "@".$imageDirectory.$picture[$picture_no];

The error that I'm getting is :

:0 cURL error: failed creating formpost data 


Using urlencode() may help you http://php.net/manual/function.urlencode.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜