Recommended: ASP tutorial: database operation class written by yourself There are a lot of database operation categories searching online. I am not better than those, but I just wrote them myself and used them more. So there is nothing special about me, I just use my habits. As for efficiency and other aspects, please give me advice! ! Program code:
Generally speaking, the image code of the website is like this.
| The following is the quoted content: <img src=./attachments/test.jpg /> |
Right-click on the image and select properties to see the real address of the image. This will give other websites an opportunity to steal the links to your website’s pictures. We can use a little trick to prevent this.
Create a new showimg.asp (or showimg.php) file (this article uses asp syntax. In fact, except for different syntaxes, the basic ideas of php are the same), and what it needs to do is take the value of the file from the request. as follows:
| The following is the quoted content: <% Dim filename filename=request(file) response.Redirect attachments/ & filename & .jpg %> |
Change the image code to the following method:
| The following is the quoted content: <img src=./showimg.asp?file=test /> |
Share: Talk about writing code similar to search engine functions using asp First, create an access database. There is a URLINDEX table in the library, where the URL and Keywords fields are indexed respectively, as follows: The following is the referenced content: URL text (index