function to take advantage of today's free, fixed a bit of this function, tested, in the local server through, the space quotient server can also be used normally, no errors found. My Kaspersky doesn't report poison. ^_^
as long as the change, this function is placed on which site is applicable. Here just to add a picture to illustrate the call method, other location methods similar.
in my native test success, because now not even on the space of the FTP, so no office in the space test, find problems, please come to the group.
One, put the following function into the ft_admin_conn.asp of the last
Adodbs.savetofile (Server.MapPath (Savepath)) ' Save to local
Adodbs.seteos
Set adodbs=nothing
if Filefolder.fileexists (Server.MapPath (savepath)) =false Then ' If the save succeeds, return the remote address, only makes the remote connection, avoids some anti-theft even the website cannot save
Saveimgfile=imgfileurl
Else
Savepath=replace (Savepath, ". /","")
Saveimgfile=savepath
End If
Set filefolder=nothing
End If
End Function
Two, open admin/admin_pic.asp file
1, find: Add picture process pic_pic=checksql ("Thumbnail image address", Request.Form ("pic"), 1,100) (presumably in line No. 368) Insert code below:
if left (pic_url,7) = "http://" and Request.Form ("save") = "true" then
pic_url=saveimgfile (Pic_url)
Pic_pic=pic_url
End If
Find again: <input type= "Submit" name= "Submit" value= "OK Add" > (presumably on line No. 481) Insert the following code:
<input type= "checkbox" Name= "Save" value= "true" > Save remote Picture at the same time
2, add the corresponding code in the same place in the edit picture process (Editpic).
OK, finished
hope you can give a return, other use of the picture is the same place to invoke the method.
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.