1. AJAXspacer
  2. ASPspacer
  3. CSSspacer
  4. Javascriptspacer
  5. Windows 應用程式spacer
  6. 網頁設計
  7. 評論、短文、雜文spacer
  8. 版主spacer
  9. 最新回應spacer


簡單 ADODB Stream 應用例

許多例子,都是使用 Stream 物件來當作下載用途,目的是隱藏下檔檔案來源。這個方法在 Windows 2003 IIS6 中對 asp 的限制,只能作 4MB 大小檔案傳輸,對 aspx 則似乎沒有限制。

不用 asp 的用戶不用心焦,找到伺服器中的這個檔案 \Windows\System32\Inetsrv\Metabase.xml,把 AspBufferingLimit 值改掉即可。


<img src="s.asp?f=CrossBrowser.png" border="0">



<a href="s.asp?f=CrossBrowser.png">按我下載上圖</a>

剩下的,就是你參數 f 只傳了檔名,那實際檔案在那呢?自己安排吧,如下面程式碼,filename 即為來源指定。


Set fso = Server.CreateObject("Scripting.FileSystemObject")

If fso.FileExists(filename) Then

Set objFile = fso.GetFile(filename)

Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"

'建立 ADODB Stream 物件
Set objStream = Server.CreateObject("ADODB.Stream")

objStream.Type = 1

Response.CharSet = "UTF-8"



Set objStream = Nothing
Set objFile = Nothing



End If
Set fso = Nothing

下載本文 asp 原始檔

卜維丰 2/2 07'



Lelio Vieira Carneiro Junior   2017/11/10 上午 07:44:00

You could definitely see your skills within the work you write.
The sector hopes for even more passionate writers such as you who are not afraid to say how they believe.
At all times go after your heart.

How much does it cost to lengthen your legs?   2017/10/4 下午 04:08:00

Very rapidly this web page will be famous amid all
blogging viewers, due to it's good content

How do you get taller?   2017/9/23 上午 08:04:00

This piece of writing gives clear idea for the new people of blogging,
that actually how to do blogging.

What is the Ilizarov method?   2017/9/4 上午 05:34:00

You made some decent points there. I looked on the net for more
information about the issue and found most individuals will go along with your views on this site.

Can better posture make you taller?   2017/9/1 上午 05:10:00

My family every time say that I am killing my time here at web,
however I know I am getting experience all the time by reading thes pleasant articles or reviews.

Www.Loveit.pl   2017/8/29 下午 10:32:00

It's perfect time to make some plans for the longer term and
it is time to be happy. I've read this put
up and if I may I desire to counsel you some attention-grabbing issues or suggestions.
Maybe you could write next articles referring to this article.
I want to read more things about it!

What causes burning pain in Achilles tendon?   2017/8/29 下午 01:38:00

I am actually happy to read this webpage posts which consists of lots
of useful data, thanks for providing these kinds of statistics.

How do I stretch my Achilles tendon?   2017/8/29 上午 02:58:00

fantastic points altogether, you just won a brand new
reader. What could you recommend about your submit that
you made a few days ago? Any sure?

How do you prevent Achilles tendonitis?   2017/8/28 上午 02:39:00

It is not my first time to pay a quick visit this site,
i am visiting this website dailly and get good data from here daily.

How much does it cost for leg lengthening?   2017/8/27 上午 10:02:00

Excellent way of describing, and nice post to get data
on the topic of my presentation subject matter, which i
am going to deliver in university.

Why does it hurt right above my heel?   2017/8/21 下午 08:43:00

Outstanding story there. What happened after?
Good luck!

How much does it cost to lengthen your legs?   2017/8/10 上午 04:07:00

I'll right away take hold of your rss feed
as I can't find your email subscription link or e-newsletter service.

Do you've any? Kindly permit me realize so that I could subscribe.

toniacervantes.weebly.com   2017/7/31 上午 03:19:00

Spot on with this write-up, I seriously feel this website needs a lot more attention.
I'll probably be returning to see more, thanks for the information!

Can you lose weight by doing yoga?   2017/7/21 下午 09:03:00

I do not even know how I ended up here, but I thought this post was great.
I don't know who you are but certainly you are going to a famous blogger if you are not already
;) Cheers!

foot pain due to diabetes   2017/7/4 上午 04:34:00

Glad to be one of many visitants on this awe inspiring website

   2017/6/24 下午 08:06:00

Hello i am kavin, its my first occasion to commenting anyplace, when i read
this piece of writing i thought i could also make comment due to this sensible post.

irmamorando.bravesites.com   2017/5/7 下午 04:46:00

Stunning story there. What happened after? Good luck!

lamictal 50 mg   2017/5/4 上午 07:43:00

you're actually a just right webmaster. The site loading pace
is incredible. It kind of feels that you are doing any unique trick.
Moreover, The contents are masterwork. you have performed
a wonderful activity on this matter!

manicure   2017/5/4 上午 04:13:00

Hello! I know this is kind of off topic but I was wondering which blog
platform are you using for this site? I'm getting
sick and tired of Wordpress because I've had problems with hackers and I'm looking
at alternatives for another platform. I would be awesome if you could point me
in the direction of a good platform.

manicure   2017/4/11 下午 06:10:00

Hello everybody, here every one is sharing these kinds of familiarity, so it's good to read this weblog, and I used to
pay a visit this blog everyday.

卜維丰   2011/7/17 下午 02:35:00

Zero, sky

我是沒遇, 你們可試試 UTF-8 編碼

zero   2011/6/28 下午 05:39:00


我將檔名先Server.UrlEncode("中文檔名")....不會出錯,但是檔名變成"中文檔名.pdf[1]" ....不知為何後面都會多出[1].....

不知是否有解決方案呢!? 謝謝 ^^

MotoJ   2010/2/10 下午 08:56:00





sky   2009/5/27 上午 11:09:00


卜維丰   2008/5/8 下午 09:22:00

底下這篇, 說是廣告信先鋒部隊, 不過滿好笑的, 大致翻譯給各位看看....

一個下午, 我在後院晾衣服, 一隻看起來又老又累的狗跑進我院子, 我由他的項圈和凸出來的肚子可以得知, 這是有人養的狗.

當我回屋裡時, 他跟了進來, 然後從容的躺在角落睡覺, 一小時後, 他走到到門口, 我讓他離開, 隔天, 他又回來了, 躺在同一個地方又睡了一小時, 這種情況持續了好幾周.

我很好奇, 於是在他的項圈上別了張紙條寫"你家的狗每天下午跑到我這裡來小憇片刻", 隔天, 他的項圈上別了另一張紙條回來"他生活在一個有十個小孩子的家庭, 他試著要補眠"

抱歉, 沒按規定留言

Melissik   2008/5/8 下午 08:14:00

One afternoon, I was in the backyard hanging the laundry when an old, tired-looking dog wandered into the yard.
I could tell from his collar and well-fed belly that he had a home. But when I walked into the house, he followed me, sauntered down the hall and fell asleep in a corner. An hour later, he went to the door, and I let him out. The next day he was back. He resumed his position in the hallway and slept for an hour.
This continued for several weeks. Curious, I pinned a note to his collar: "Every afternoon your dog comes to my house for a nap. "
The next day he arrived with a different note pinned to his collar: "He lives in a home with ten children - he's trying to catch up on his sleep."

I cried from laughter
Sorry, if not left a message on Rules.

  如果您是要發問問題, 最好有個問題測試的網址, 這樣比較容易找到您問題所在, 謝謝