LINUX CGI编程实例,linux_cgi编程(Linux_cgi programming).doc

Linux CGI编程用于实现HTML表单数据与服务器端程序的交互。文章指出,JavaScript不能替代CGI,因为JavaScript运行在客户端,而CGI在服务器端工作。CGI不是一种语言,而是一组规范,可以用任何编程语言实现。由于C语言的平台独立性和高效性,它是CGI编程的常用选择。CGI主要用于处理如远程数据库交互等客户端无法解决的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

linux_cgi编程(Linux_cgi programming)

linux_cgi编程(Linux_cgi programming)

This article is contributed by whyang2006

Pdf documents may experience poor browsing on the WAP side. It is recommended that you first select TXT, or download the source file to the local view.

Why CGI? In HTML, when customers fill out the form, and click the send button (submit), the contents of the form is sent to the server, in general, then you need to have a server-side script to form the content of some processing, or save them up. Or make some inquiries according to the content, or some other what. Without CGI, the world of WEB completely loses its interactivity, and all the information becomes one-way, without any feedback.

Some people think that JavaScript can be used instead of CGI programs, which is actually a conceptual mistake. JavaScript can only run in the client browser, while CGI is working on the server. The work they do has some intersection, such as form data validation, but JavaScript is absolutely impossible to replace CGI. But it can be said that if a job is to do with JavaScript, and can be used to do CGI, you absolutely need to use JavaScript, the speed of execution, JavaScript CGI has inherent advantages. Only those problems that can not be solved by clients, such as interacting with a remote database, should be used with CGI.

In brief, it is the interface CGI (Interface) that is used to communicate HTML forms and server-side programs. Say it is an interface, that is to say, CGI is not a language, but a set of specifications that can be applied by other languages. In theory, you can write CGI programs in any programming language, as long as you are programmed to conform to some of the things defined by the CGI specification. Because the C language in the platform independent of good performance (there are corresponding compiler in almost any platform, and are regarded as below) for the majority of programmers are familiar with (unlike Perl), therefore, C is one of the preferred language for CGI programming

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值