如何使用 BASH 脚本解析 CGI 脚本中的 POST 数据?
我有一个用 bash 编写的 cgi 脚本,我必须读取发送到该文件的 POST 变量。 我不擅长 bash 脚本,所以我真的需要这个帮助。
我从 php 脚本发送一个名为 log_message 的 POST 变量到此 cgi,但我不知道如何从标头解析 POST var。
有什么帮助吗?
I Have a cgi script written with bash and i have to read a POST variable sent to this file.
I am not good at bash scripting so i really need this help.
From a php script I send a POST variable named log_message to this cgi but i don't know how to parse the POST var from the header.
Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些 sed 都应该有一个
g
,如下所示:否则它会在第一次替换后停止,这通常不是所需的行为。
those seds should all have a
g
, as in:otherwise it stops after the first replace, which is not generally the desired behaviour.