If you have two spaces, one big and slow, another small and fast, or one of them does not support FSO, then upload files across the server in front of you, the following is my ylog.net inside the cross server upload file diary, this problem seems simple, The details are very interesting.
Prerequisite, space must support ASP, upload file server support FSO, the following narrative, diygame.com for the storage of uploaded files server, ylog.net for Web server, that is, display the user interface of the server ...
Implementation of the function, file upload, upload in the text area of the page automatically added to the image of the UBB code, in order to clear, the following list all the files used
Server File name Purpose
diygame.com blog_upfile.asp receive uploaded files with
Ylog.net blog_add.asp Add blog, upload file function in this show
Ylog.net blog_upload.asp upload file form, embedded in the form of an IFRAME in the blog_add.asp
Ylog.net blog_upresult.asp Display upload results, for the aftermath of the work
Ylog.net blog_upcheck.asp Authentication user name and password
blog_add.asp add an iframe to the Post blog page, call blog_upload.asp for upload operation
<iframe border= "0" frameborder= "0" framespacing= "0" height= "" marginheight= "0" marginwidth= "0" noresize scrolling = "No" width= "100%" vspale= "0" src= "blog_upload.asp" ></iframe>
If you've ever played with an ASP, it's natural to think that files will be uploaded to another server, as long as you point to the target server in the Blog_upload.asp Upload Form Action page,
<form name= "form" method= "POST" action= "Http://www.diygame.com/blog_UPFILE.ASP"
Omitted in the middle
Submit the release of the blog button disable first, so as not to pass the end of the user blog published
<input type= "Submit" Class=button Name= "submit" value= "Upload" onclick= "parent.document.frmannounce.submit.disabled= True ">
Test, File upload success, that automatically add UBB code ...
Add a JS script to Http://www.diygame.com/blog_UPFILE.ASP
<script>parent.frmannounce.content.value+= ' [img]http://www.diygame.com/' +FileName+ ' [/img] ' </script > Pass up to test again, Error prompts "Blog_upfile." ASP permissions is not enough, since the diygame.com file permissions, Ylog.net can always, when the blog_upfile.asp operation is completed, and then call a server ASP file, so blog_upresult.asp appeared, he was responsible for the aftermath
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service