Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to run CGI script with parameters from console

Tags:

c

cgi

I've wrote CGI script for www.

This script expects two parameters through GET method, multiply these numbers and write result into the file.

mult.cgi?m=1&n=2

But now I want to use this script from console too. I'tried something like

./mult.cgi?m=1&n=2

But it didnt work, how can I send parameters to script?

thanks.

like image 945
Meloun Avatar asked Jun 14 '26 12:06

Meloun


1 Answers

QUERY_STRING="m=2&n=4" ./mult.cgi 
like image 121
Meloun Avatar answered Jun 16 '26 06:06

Meloun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!