2007년 5월 9일 수요일

Upload Files to a Web Server - Simplest Example

흠 이건 처음보는 모듈인데?
아 답답해서 혼 났네
chilkat 이라 CPAN가서 찾아봐야겠네

cpan에 없는 모듈인데?
흠 이건 모지?



use chilkat; $upload = new chilkat::CkUpload(); # Specify the page (ASP, ASP.NET, Perl, Python, Ruby, CGI, etc) # that will process the HTTP Upload. $upload->put_Hostname("www.freeaspupload.net"); $upload->put_Path("/freeaspupload/testUpload.asp"); # Add one or more files to be uploaded. $upload->AddFileReference("file1","dude.gif"); $upload->AddFileReference("file2","pigs.xml"); $upload->AddFileReference("file3","sample.doc"); # Do the upload. The method returns when the upload # is completed. # This component also includes asynchronous upload capability, # which is demonstrated in another example. $success = $upload->BlockingUpload(); if ($success != 1) { print $upload->lastErrorText() . "\n"; } else { print "Files uploaded!" . "\n"; }

댓글 없음:

댓글 쓰기