Question

I am going to build CGI web application and start learning that technology. I'd like to use C++. So I started my local server and put a simple script in my cgi-bin folder, compiled it with g++ test.cpp -o app (using Mac OS X) and tried to run it with: localhost/cgi-bin/app. And it worked.

But reading on the web I keep seeing examples where scripts are compiled(?) as .cgi files. Am I forced to do the same? What's the difference?

Was it helpful?

Solution

You don't have to specify .cgi extension. That said, please note that the choice to use CGI and C++ for developing interactive web applications is very unusual at this point. People pretty much stopped doing it this way some time in the 90s. Not to say that there is never a reason to do it. But be warned.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top