# Re: VB写CGI的

Posted by tommy on August 21, 1999 at 10:00:55:

In Reply to: VB写CGI的 posted by CGI初学 on August 21, 1999 at 09:02:56:

: 各位CGI高手:
发生程式似乎死掉,用 del+ctrl+alt 结束出现
********************************************
500 Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Message: Empty output from CGI program C:/WebSite/cgi-win/8_11.exe

Please contact the server administrator at told_me@hotmail.com and inform them of the time the error occured, plus anything you know of that may have caused the error.

Also, please return to the referring document and note the hypertext link that led you here.

例子的CGI有问题???? 可否帮帮忙!　谢谢
CGI初学者
<br>范例8-1 留言版<br>

## 示范程式 8-1：留言版

    请留下你的大名：
    你的年龄：
    你的地址：
    你的E-mail address：
    我有话要说：
    <br>         学业尚未成功<br>           硕士仍须努力<br>

Sub CGI_Main()
Dim filepath As String
Dim fileno As Integer
Dim yourname As String
Dim age As Integer
Dim address As String
Dim email As String
Dim words As String

yourname = GetSmallField("yourname")
age = GetSmallField("age")
address = GetSmallField("address")
email = GetSmallField("email")
words = GetSmallField("words")

filepath = "c:\website\htdocs\8_1_board.htm"
fileno = FreeFile

MsgBox (filepath)

Open filepath For Append As #fileno
Print #fileno, "

### 本人乃" & yourname & "是也

"
Print #fileno, "我已经活了" & age & "年了
"
Print #fileno, "我的窝在" & address
Print #fileno, "
我想说：
" & words
Print #fileno, "
寄封E-mail给我吧！" & email & "

"

Close #fileno

MsgBox ("In CGI-Main")

Send ("Content-type: text/html")
Send ("")
Send ("
")
Send ("
")
Send ("
你想看我吗？靠近一点
")
Send ("
天啊！我还要在留一次言
")

MsgBox ("Over!")

End Sub

Follow Ups:

- Re: VB写CGI的 dino 16:39:06 8/21/99 (0)