Shell 编程用CURL 模拟POST 上传文件 解决417 Expectation
来源:互联网 发布:ssm 打印sql 编辑:程序博客网 时间:2024/04/29 02:12
话不多说直接抛代码
curl -H "Expect:" -F "passport=monitor_134" -F "data=@/root/monitor/result/mid_1_rule_1.txt" http://192.168.1.207:80/monitor2.006/collect/receiveShellResultFile.php > /root/monitor/log/post.log
上面的代码 稍微解释一下:
第一个参数 -H “Expect” 用来解决在lighttpd 下 " 417 - Expectation Failed "
第二、三个参数 -F 就是你上传表单里的字段 其中 @后面表示要上传的本地文件路径
PHP 接收端就不用我贴了吧 ,如果你不会那是你自己的问题了。。。。
试试吧
- Shell 编程用CURL 模拟POST 上传文件 解决417 Expectation
- PHP curl 模拟POST 上传文件
- PHP Curl Post 417 - Expectation Failed
- PHP CURL 模拟POST请求 提交数据或上传文件
- php curl 模拟post上传文件应用实例
- CURL 模拟文件上传
- 使用cURL POST上传文件
- 模拟POST上传文件
- CURL模拟post上传图片到七牛云
- PHP CURL模拟表单post提交文件,curl POST文件
- 关于curl模拟上传文件
- php curl 模拟上传文件
- PHP 模拟curl上传文件
- 【Cocos2dx】HTTP Post 上传文件(curl库)
- php curl post 上传文件流
- PHP CURL模拟登陆并且上传文件
- curl post模拟上传提交图片大全 整理版本
- 用php curl 模拟post 提交
- C++命名规则(2)
- EXCEL to Access代码,也可应用于SQL Server
- plsql 中文乱码 plsql 乱码 字符集解决方案
- 单链表反转
- 快毕业了哇
- Shell 编程用CURL 模拟POST 上传文件 解决417 Expectation
- 23种设计模式——Decorator模式
- 刷新页面
- 模拟Struts1实现防表单重复提交
- Linux中如何创建静态库和动态库
- 使用SuperSocket实现TLV自定义协议网络通信的Demo
- nginx+php-fpm遇到的502报错
- GridView获取行所在的索引
- Drag&Drop ListView