[ back to toc ]

Writing a file to a local hard disk

Date: 2002/02/09 17:11

Q:
Sir,

I am running a perl scrip on a unix server and I would like this script to
write a file to the client's local hard drive in a particular directory.

I keep getting the error cannot create file. Please tell me what I am
doing wrong.

open(DB,">c:/newfss/fss5/criteria.db") || die ("Error Creating Criteria
File");

$sth1=$dbh->prepare(q{select * from criteria order by critno}) || die
$dbh->errstr;
$rv1=$sth1->bind_columns(undef,\($critno,$critdescrip,$q1ref));
$sth1->execute();
while($sth1->fetch)
{
print DB $critno,"::",$critdescrip,"::",$q1ref,"\n";
}
close DB;
$sth1->finish;

Thanks in advance

Regards
*NAME-DELETED*
A:
Fortunately you can not do that. There is no any way you can do that.
Imagine what could happen to your PC if a malicious server programmer
could just put any file on your client PC disk! (CIA secret information,
pornographic file anything causing you trouble!)

As others can not do that you can not do that as well.

My true, honest and really positive feedback is that step one level back
in your studies and try to get deeper knowledge of the architecture of the
systems. I am not joking!

Regards,
Peter

[ back to toc ]