Before writing this program, you are thinking about buying a click JSP space to make a self-download site. But after watching the online quotation, JSP's space costs are much more expensive. I have to solve other ways to solve. Now use the FTP uploading method to solve these problems, you can upload resources to the specified server. This don't have to worry about the high space cost. <% @ page language = "java" import = "com.jspsmart.upload. *" Import = "java.text. *, java.util. *, java.io. *, org.apache.commons.net.ftp * "%> <% @ Page ContentType =" text / html; charset = GBK "%>
If (! myfile.ismissing ()) {size = myfile.getsize (); filename = myfile.getFileName (); fileExt = myfile.getfileExt (); path = myfile.GetFilePathName (); suffix = filename.substring (0, Filename.lastIndexOf ('.')); If (size> = 300000) {out.print ("