I use PHP and I know that PHP is written in C or uses C somehow. I'm trying to understand lower level languages. So can someone explain to me how the HTML that PHP generates (let's say the markup for a form) is built with C. Can I build a web form in C or C++ and how?
It's possible to write a Common Gateway Interface (aka "CGI") program in any computer language which can send text to the standard output channel (i.e. pretty much every one):
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Content-type: text/html\n\n");
printf("<pre>Hello, World!</pre>\n");
return EXIT_SUCCESS;
}
[html, body, etc tags omitted for brevity].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With