About the picture and text of specific ideas in the database

zhaozj2021-02-11  222

About the picture and text of specific ideas in the database

First, your form is set to

Please choose a picture to upload: then next page, with separation Divide the text, you can't use Request.Form, it should be changed to FormData = Request.BinaryRead (Formsize)

FormSize = Request.TotalBytesbnCRLF = chrB (13) & chrB (10) Divider = LEFTB (FormData, INSTRB (FormData, bnCRLF) - 1) DataStart = INSTRB (FormData, bnCRLF & bnCRLF) 4 DataEnd = INSTRB (DataStart 1, Formdata, Divider) - DataStartResponse.contentType = "image / gif" response.binaryWrite MIDB (FormData, DataStart, DataEnd)

This is the image is then converted to the text in the text.

Sign up.

Formsize = Request.TotalBytes subtracts the size of the result with the total size. Size of text. Then derive its value with a string function. Finally there is a database.

Note that this method cannot complete saving as a file. Because the file object in VBScript cannot handle the binary format. (Image things binary) but VB can, so we have used components to complete the above work. I use my own components yourself so that you can complete the database and save the file. It can also limit the size, file type (GIF, JPG, HTM, EXE), etc., but the specific idea code is still the same as the code.

转载请注明原文地址:https://www.9cbs.com/read-4145.html

New Post(0)