本文以apache为web服务器为例
- 安装apache服务
yum -y install httpd - 启动apache
systemctl restart httpd - 创建shell脚本
cd /var/www/cgi-bin/
vim shellshell#!/bin/sh alias urldecode='sed "s@+@ @g;s@%@\\\\x@g" | xargs -0 printf "%b"' echo -e "Content-type: text/plain\n" decoded_str=`echo $QUERY_STRING | urldecode` echo -e "`$decoded_str` \n"