Accessing programs in CGI

This is a discussion on Accessing programs in CGI within the A Brief History of Cprogramming.com forums, part of the Community Boards category; One of the main reasons I'm doing my project with CGI and not Java (with exception to Servlets) is so ...

  1. #1
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    Accessing files in CGI

    One of the main reasons I'm doing my project with CGI and not Java (with exception to Servlets) is so that I could access files on the users computer. Now, if I have a cgi program and I reference, lets say c:\CGIASM\myfile.asm to write or load it, is that going to be referring to the user's computer? or the servers computer? If it is the server, does anyone know how to force it to refer to the users program? The user will be selecting the file, so does that change anything?
    Last edited by sean; 06-12-2002 at 12:48 PM.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    When your program is loaded by the client (in say its browser) you can work with HTML, various scripts, applets and stuff like flash movies, but none of these can directly affect files (there are alternatives to the previous like ActiveX, but I doubt if that's what you want)

    If you want the user to be able to submit files, do something like

    Code:
    <FORM ACTION="http://MyDomain.com/MyCGIProg" ENCTYPE="multipart/form-data">
    Upload your ASM file
    <INPUT TYPE="file" NAME="Upload_Name">
    </FORM>
    That will allow your server to recieve files from a client computer.....You just need to decode it and do whatever...

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well that pretty much means that my project that I planned for the entire summer won't work.... darn.. CGIASM is no more.

  4. #4
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    If I understand, you want to write an ASM compiler online...

    Well just have the person type up their code in an input box, and when they hit "assemble" then just have your program take that data from the box, assemble it, and write it to the users computer as a cookie...then you can tell the person to grab it from their cookies folder and rename it to an exe.

  5. #5
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well I considered that - but I really wanted this to run stand-alone so that it would function like a regular compiler.

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Sorry......I dont see it would be too bad....

    The user writes his/her .asm file/files.......Clicks the browse button on the html page you provide......a file dialog comes up.......they select the file......click submit......your program assembles into .obj files or whatever.....the files are sent back for the user to download....they do the same for linking......the exe is then sent back for download......

    Not too bad.....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. accessing other programs data space.
    By eyal.gal in forum Windows Programming
    Replies: 1
    Last Post: 03-09-2008, 11:01 AM
  2. CGI program help please
    By Lince in forum C Programming
    Replies: 3
    Last Post: 08-01-2007, 01:31 AM
  3. Accessing memory of other programs
    By Inquirer in forum C Programming
    Replies: 4
    Last Post: 10-07-2003, 03:43 PM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 04:42 AM
  5. Problem with cgi script - can't rename files
    By bjdea1 in forum C Programming
    Replies: 2
    Last Post: 12-12-2001, 03:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21