cgi

Project ideas to become good at C++

谁都会走 提交于 2019-12-20 09:37:27
问题 I want to get into C++ team at work. Their job is to write CGIs in C++ (mainly but not limited to). I know basic C++. Reading the list at C++ book guide question on SO, I've got three books from a friend (I actually had the first one). The C++ Programming Language - Bjarne Stroustrup - for reference C++ Templates The Complete Guide - David Vandevoorde / Nicolai M. Josuttis Modern C++ Design - Andrei Alexandrescu I would like to know if there are any projects or ideas you can tell me that I

How can I do paging and sorting in a Perl CGI program?

老子叫甜甜 提交于 2019-12-20 07:48:37
问题 Here is the table in which I am retrieving the data from an SQLite database. Its having lots of records, so near that ADD button I need something like |< < > >| which would do the paging function whenever I click. Also, besides the table each header (e.g. UserName UserId) I need a sorting button. Something like a ^ button. Please do help me find the solution..Thank You. #!C:\perl\bin\perl.exe use CGI; use CGI qw/:standard/; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); my $q = new CGI;

Writing a perl cgi applications which runs as root

孤街浪徒 提交于 2019-12-20 07:24:08
问题 I am writing a perl cgi application. At some point of time this cgi application needs to run as root to access and write into a specific file. I would like to know how exactly I should go about doing this and the security precautions that I should take while doing it. 回答1: You pretty much shouldn't. If you can't avoid it, create a small and simple piece of code that runs with setuid root that does exactly that task and nothing more, or use sudo or similar to run a script that does just that.

How can I use a database server from a Perl CGI script?

流过昼夜 提交于 2019-12-20 06:51:28
问题 My program works already, I have Perl (GUI Window) where I can input data, data passed to the webpage (using to Tomcat server, JSP) and then saved it to oracle database. What I want is to make search parameter (webapp) that retrieve/extract data from the Oracle database using Perl CGI. Is it possible? Or any suggestions to solve my program? Thanks!:-) 回答1: Yes you can by using DBI and DBD::Oracle modules. However there are some gotchas with Oracle. I remember a few fun and games with Oracle 8

I am trying to create a form with PERL/CGI, and I would like to process the data introduced in that form within the same CGI file

谁说胖子不能爱 提交于 2019-12-20 06:47:02
问题 ' I am trying to create a form with PERL/CGI, and I would like to process the data introduced in that form within the same CGI file. This is what I have for my code on the HTML5 side….' <body> <form action="form.cgi" method="get"> </form> <h1>Feedback Form</h1> <p>Please fill out the entire feedback form.</p> <table> <tr> <td><b>To (recipient's e-mail address):</b></td> </tr> <tr> <td><input type = "text" name = "mailTo" size = "40" /></td> </tr> <tr> <td><b>From (your e-mail address):</b><

Output of command in Bash script to Drop-down box?

百般思念 提交于 2019-12-20 06:19:05
问题 First off, I appreciate any and all help in answering this question. I have a command in a bash script that will output the following: 255 254 253 252 ... 7 6 5 4 3 2 1 It is a specific list of numbers, beginning with the largest (which is what I would like), then going to the smallest. The dataset is space-delimited. The output above (except including all numbers), is what you would see if you ran this command in the terminal on a linux machine, or through a bash script. I have configured my

How to redirect from one CGI to another

痞子三分冷 提交于 2019-12-20 06:12:32
问题 I am sending data from A.cgi to B.cgi . B.cgi updates the data in the database and is supposed to redirect back to A.cgi , at which point A.cgi should display the updated data. I added the following code to B.cgi to do the redirect, immediately after the database update: $url = "http://Travel/cgi-bin/A.cgi/"; print "Location: $url\n\n"; exit(); After successfully updating the database, the page simply prints Location: http://Travel/cgi-bin/A.cgi/ and stays on B.cgi , without ever getting

Getting empty form fields with Python cgi stdlib

旧时模样 提交于 2019-12-20 06:04:04
问题 I am passing multiple form fields which are optional, but which need to be associated with a user. Python's cgi.FormDict and cgi.FieldStorage both eliminate blank entries, so items get shifted "up" and associated with the wrong user. This problem most often shows up with checkboxes (which I have), but I also have text fields. Simplified form code: <input type="text" name="user" /> <input type="text" name="email" /> <input type="text" name="phone" /> <input type="checkbox" value="MailingList1"

JavaScript removing contents of form hidden by animatedcollapse.hide

放肆的年华 提交于 2019-12-20 05:26:22
问题 I'm using JavaScript to hide and show div contents within a simple web form I made. However, I noticed that the submitted form (it sends the form as a dictionary to Python CGI) may still contain nonempty submitted values for hidden items. Usually, this happens because you enter some values into field X, click a link that hides the div containing field X, and then submit. I know that I can manually clear all of the input fields (i.e. field X, etc.) in a div when the div is hidden, but is there

PHP File upload - memory handling on CGI

拜拜、爱过 提交于 2019-12-20 04:24:40
问题 I'm wondering how PHP handles a file upload. I'v read a file upload will be split in chunks and will be assembled after the upload has finished. Is there any verification of this fact? This will help to understand the handling and settings for a file upload. Is the handling of mod_php or CGI the same? mod_php is more tied together with Apache. CGI has to read a stream and then do it's magic. How is the memory involved in this process. Is this correct? Apache handles HTTP request Apache calls