curl -u httpuser:httppassword -F “postParameterName=value” -F “fileFieldName=@fileNameInOs” http://dev.ymeng.net/upload.php
- -u 指定http认证用户名及密码
- -F 指定使用HTTP multipart POST方式发送参数
- @ 读取文件
php处理代码
< ?php $parameterValue = $_POST['postParameterName']; $uploadedFileName = $_FILES['fileFieldName']['name']; $uploadedFileSize = $_FILES['fileFieldName']['size']; // move_uploaded_file... ?> |