in reply to Re: Re: Uploading files to server
in thread Uploading files to server

Hi again,
try exit; instead exit:
You have to write html headers too
It is also recommended to use strict and warnings.
#!/usr/local/bin/perl -w use CGI; use strict; my $q = new CGI; print $q->header; print $q->start_html("Example"); my $file = $q->param('file'); my $up = $q->upload("$file"); while (<$up>) { print; } exit;
Last, but not less important, check the permissions. Maybe you shouldn't be able to write.
Check the error 500 with Netscape. It brings useful information about the error.
It is probably syntax error

Hope this help
Hopes

Replies are listed 'Best First'.
Re: Re: Re: Re: Uploading files to server
by Calilo (Initiate) on Oct 15, 2001 at 04:37 UTC
    oky

    that worked thanks alot

    now if im correct i only have to add a part that copys the

    file to a safe place so is'nt deleted after uploaded, right??

    # Read a text file and print it out while (<$file>) { print; } # Copy a binary file to somewhere safe open (OUTFILE,">>/usr/local/web/users/feedback"); while ($bytesread=read($file,$buffer,1024)) { print OUTFILE $buffer; }
    am i right????

    Calilo

    thanks alot hopes