After thinking I had my probs straightened out, I ran into one I can't really seem to find any info on....
When running the script below, I get Short Read: wanted 437, got 0
My brain, which is admittedly a little fried today, guesses that the script is not getting the bytes it expects. Hence the "wanted 438, got 0" part.
The question I have now, is can anyone spot where the problem lies or know what can cause this error?
Thanks!
Jim
#!/usr/local/bin/perl use CGI; $query = new CGI; print $query->header; print $query->start_html(-title=>"UPLOAD PLEASE"); # retrieve the upload file name. unless ($file = $query->param('fileID')) { &showError('No file name specified.'); } @pathName = split(/\\/,$file); $newFile ='/home/users/web/b2578/pow.royridgeway/htdocs/Roy/'; $newFile .= pop(@pathName); open(OPF,">$newFile") || &showError("Failed to open OPF, $!"); print "<P><CENTER>Uploading <BR>$fileID <BR>to<BR>$newFile<BR></CENTER +></P>\n"; while ($bytesread=read($file,$buffer,1024)) { print OPF "$buffer"; } close OPF; print $query->end_html; }
In reply to Short read error? by JimJx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |