yaman666
08-16-2007, 02:49 AM
I am trying to trouble shoot a site that used to upload files ok but then stopped working. The person responsible for the site before is not available so I have no information as to what may have happened.
I created a new basic upload form using a tutorial. I used the proper form enctype='multipart/form-data'. Relevant code:
$query = new CGI;
$filename = $query->param("photo");
# print $filename prints the actual file name ok
$upload_filehandle = $query->upload("photo");
# print $upload_filehandle prints the actual file name ok
while ( <$upload_filehandle> ) {
# inside of while loop never reached
....
}
Basically file handle opens ok and prints out file name, but I can never read the actual file whether it's while (<$file_handle>) or read ($file_handle ...).
Any suggestions?
Thanks!
I created a new basic upload form using a tutorial. I used the proper form enctype='multipart/form-data'. Relevant code:
$query = new CGI;
$filename = $query->param("photo");
# print $filename prints the actual file name ok
$upload_filehandle = $query->upload("photo");
# print $upload_filehandle prints the actual file name ok
while ( <$upload_filehandle> ) {
# inside of while loop never reached
....
}
Basically file handle opens ok and prints out file name, but I can never read the actual file whether it's while (<$file_handle>) or read ($file_handle ...).
Any suggestions?
Thanks!