台灣最大程式設計社群網站
線上人數
815
 
會員總數:245894
討論主題:189492
歡迎您免費加入會員
討論區列表 >> VB6 >> pure upload發生問題, 發生的問題, 急救
[]  
[我要回覆]
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
pure upload發生問題, 發生的問題, 急救
價值 : 10 QP  點閱數:1555 回應數:0
樓主

史天高
門外漢
0 4
34 0
發送站內信

本人用pure upload發生問題, 發生的問題是
錯誤類型:
Microsoft VBScript 執行階段錯誤 (0x800A000D)
型態不符合: 'uploadform'
/new_ncrhk/admin/upload_logo.asp, line 203

但當我Refresh就可繼續使用, 為何呢?

我的程式碼如下 :

<%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%>
<!--#include file="../Connections/ncrhk.asp" -->
<%
Dim rsallprogram__MMColParam
rsallprogram__MMColParam = "1"
If (Request.QueryString("channel_number") <> "") Then
rsallprogram__MMColParam = Request.QueryString("channel_number")
End If
%>
<%
Dim rsallprogram
Dim rsallprogram_numRows

Set rsallprogram = Server.CreateObject("ADODB.Recordset")
rsallprogram.ActiveConnection = MM_ncrhk_STRING
rsallprogram.Source = "SELECT * FROM channelprogram WHERE channel_number = " + Replace(rsallprogram__MMColParam, "'", "''") + ""
rsallprogram.CursorType = 0
rsallprogram.CursorLocation = 2
rsallprogram.LockType = 2
rsallprogram.Open()

rsallprogram_numRows = 0
%>
<!--#include FILE="upload.inc"--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>非商業電台 - 節目更新頁</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
font-size: 12px;
}
body {
background-color: #000000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-size: 12px;
color: #FFFFCC;
}
.style52 {
color: #FFFFFF;
font-weight: bold;
font-size: 12px;
}
.style54 {color: #FFFFFF; font-size: 12px; }
.style55 {font-size: 12px}
.style1 { font-size: 18px;
font-weight: bold;
color: #FFFFFF;
}
.style46 {color: #CCCCCC; font-weight: bold; font-size: 18px; }
.style56 {
color: #FFFF00;
font-weight: bold;
}
.style57 {color: #FFFFCC}
.style59 {
color: #FFFFCC;
font-weight: bold;
font-size: 14px;
}
.style65 {
font-size: 14;
font-weight: bold;
color: #FFFFCC;
}
.style67 {font-size: 14px; font-weight: bold; color: #FFFF00; }
-->
</style></head>

<body>
<table width="762" cellspacing="0" cellpadding="2">
<tr>
<td width="756" height="75" align="left" valign="middle" bgcolor="#FE4C00"><img src="../nn_images_mainpage/newncrhk_logo-act.gif" width="210" height="66" /></td>
</tr>
<tr>
<td height="25" align="center" valign="middle"><table width="720" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="center" valign="middle"><span class="style54">新聞管理</span></td>
<td width="100" align="center" valign="middle"><span class="style54">WEB J 管理 </span></td>
<td width="100" align="center" valign="middle"><span class="style55"></span></td>
<td width="100" align="center" valign="middle"><span class="style55"></span></td>
<td width="100" align="center" valign="middle"><span class="style55"></span></td>
<td width="100" align="center" valign="middle"><span class="style55"></span></td>
<td align="center" valign="middle"><span class="style52">&lt;回管理中心&gt;</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="28" align="center" valign="middle" bgcolor="#FE4C00"><span class="style1">非商個別節目(上傳LOGO檔案) </span></td>
</tr>
<tr>
<td height="5">&nbsp;</td>
</tr>
<tr>
<td><span class="style46">請輸入以下資料 : </span></td>
</tr>
<tr>
<td align="left" valign="top"><table width="756" border="2" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td height="90" align="left" valign="top"><table width="680" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="130">節目編號</td>
<td width="528"><%=(rsallprogram.Fields.Item("channel_number").Value)%></td>
</tr>
<tr>
<td>節目代號</td>
<td><%=(rsallprogram.Fields.Item("channel_program").Value)%></td>
</tr>
<tr>
<td>節目名稱</td>
<td><%=(rsallprogram.Fields.Item("cp_fullname").Value)%></td>
</tr>
<tr>
<td>節目主持人</td>
<td><%=(rsallprogram.Fields.Item("program_webj_name").Value)%></td>
</tr>
<tr>
<td>頻道類別</td>
<td><%=(rsallprogram.Fields.Item("channel_type").Value)%></td>
</tr>

</table></td>
</tr>
<tr>
<td height="450" align="left" valign="top"><form action="" method="post" enctype="multipart/form-data" name="form" id="form">
<table width="733" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" align="center" valign="middle"><span class="style56">請小心輸入以下 UPLOAD 之所需資料</span></td>
</tr>
<tr>
<td width="135" height="25">此為圖檔之上傳路徑</td>
<td width="590"><input name="filepath" type="hidden" id="filepath" value="../program_image/<%=(rsallprogram.Fields.Item("channel_program").Value)%>" />
<span class="style65">../program_image/<%=(rsallprogram.Fields.Item("channel_program").Value)%></span></td>
</tr>
<tr>
<td height="25">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="25">&nbsp;</td>
<td valign="bottom"><span class="style57">請參考以下所需上傳的 LOGO 圖檔名稱, 將你的節目LOGO圖檔改成以下檔名才能正常顯示 </span></td>
</tr>
<tr>
<td height="25">請選擇上傳之檔案 (1) </td>
<td><input name="upload_file1" type="file" id="upload_file1" size="40" maxlength="100" /></td>
</tr>
<tr>
<td height="25">請選擇上傳之檔案 (2) </td>
<td><input name="upload_file2" type="file" id="upload_file2" size="40" maxlength="100" /></td>
</tr>
<tr>
<td height="25">請選擇上傳之檔案 (3) </td>
<td><input name="upload_file3" type="file" id="upload_file3" size="40" maxlength="100" /></td>
</tr>
<tr>
<td height="68" colspan="2" align="center" valign="middle"><table border="2" cellpadding="0" cellspacing="0" bordercolor="#FF9900">
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="4" align="left" valign="middle"><span class="style59">請參考以下例子 : </span></td>
</tr>
<tr>
<td width="162" align="left" valign="middle">&nbsp;</td>
<td width="208" align="center" valign="middle"><span class="style57"> 190 x 50 </span></td>
<td align="center" valign="middle"><span class="style57"> 50 x 50 </span></td>
<td align="center" valign="middle"><span class="style57">25 x 25 </span></td>
</tr>
<tr>
<td width="162" height="50" align="left" valign="top">&nbsp;</td>
<td width="200" height="50" align="center" valign="middle"><img src="../program_image/clv/button_clv.jpg" alt="clv1" width="190" height="50" /></td>
<td width="150" height="50" align="center" valign="middle"><img src="../program_image/clv/normal_clv.jpg" alt="clv2" width="50" height="50" /></td>
<td width="150" height="50" align="center" valign="middle"><img src="../program_image/clv/small_clv.jpg" alt="clv3" width="25" height="25" /></td>
</tr>
<tr>
<td align="left" valign="middle"><span class="style67">所需按入的檔案名稱 : </span></td>
<td align="center" valign="middle"><span class="style67">button_<%=(rsallprogram.Fields.Item("channel_program").Value)%>.jpg</span></td>
<td align="center" valign="middle"><span class="style67">normal_<%=(rsallprogram.Fields.Item("channel_program").Value)%>.jpg</span></td>
<td align="center" valign="middle"><span class="style67">small_<%=(rsallprogram.Fields.Item("channel_program").Value)%>.jpg</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" colspan="2">&nbsp;</td>
</tr>
<tr>
<td height="30" align="center" valign="middle">&nbsp;</td>
<td height="30" align="left" valign="middle"><input type="submit" name="Submit" value="按下將上傳你的圖檔" /></td>
</tr>
</table>
</form>
<%
dim upload,file,formName,formPath,iCount,FileType
set upload=new upload_5xSoft '建立上傳對象
if upload.form("filepath")="" then '取得上傳目錄 <======此為第203行
set upload=nothing
else
formPath=upload.form("filepath")
'加目錄後面加上(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
end if
iCount=0
FileType="jpg.gif"
for each formName in upload.file
set file=upload.file(formName)
if file.FileSize>0 and file.FileSize<500000 and Instr(FileType,GetExtendName(file.FileName)) then
file.SaveAs Server.mappath(formPath&file.FileName)
response.write File.FileName&"檔案上傳成功!<br><hr>"
iCount=iCount+1
else
response.write File.FileName&"檔案大小:" & file.FileSize & "Bytes,"
response.write "檔案類型:"& GetExtendName(file.FileName) &"<br>上傳失敗,不符合限制!<br><hr>"
end if
set file=nothing
next
set upload=nothing
%>

本篇文章發表於2006-05-01 12:07
目前尚無任何回覆
   

回覆
如要回應,請先登入.