1

I am new to cgi and want to know that what cgi and cgi-bin is and what is the relationship between them, in simple words with examples to understand well. Can anyone tell ?

  • Have a look here https://en.m.wikipedia.org/wiki/Common_Gateway_Interface – Mark Setchell Jun 21 '17 at 19:56
  • Please don't share links, i have already inspected all the internet, stack overflow too but didn't get anything that is able to understand. –  Jun 21 '17 at 21:37
  • It doesn't really get any simpler than the Perl script on the link I supplied. Your browser requests a page from the server, and instead of serving you a *fixed*, *static* page, the server executes a CGI program that sends your browser something it *dynamically* calculates, or looks up, or finds in a database. – Mark Setchell Jun 21 '17 at 21:48
  • A simple example of a *static* webpage is one that always says "Hello". A *dynamic* page with CGI might *execute a program to find the time* and then *dynamically* say "Good morning" or "Good afternoon" according to the time. – Mark Setchell Jun 21 '17 at 23:04
  • And what about cgi-bin ? –  Jun 22 '17 at 12:25
  • It is just a directory where people typically put their CGI scripts - it just stands for CGI-binaries, i.e. binary/executable programs. It is only a convention, you can put them anywhere you like as long as you configure Apache to tell it where they are. – Mark Setchell Jun 22 '17 at 12:28

0 Answers0