操作无效,ASP错误。求解决办法
来源:百度知道 编辑:UC知道 时间:2024/08/22 10:41:39
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../../inc/FUNC.asp" -->
<!--#include file="../../inc/upload_5xsoft.inc" -->
<%
'-----------------------------
Dim rs
Dim sql
'-----------------------------
DIM UPLOAD
SET UPLOAD=NEW UPLOAD_5XSOFT
If UPLOAD.FORM("operation")="add" Then
call Add
elseif UPLOAD.FORM("operation")="edit" Then
call Edit
ELSE
call showerr("系统提示:操作无效!")
end if
'-----------------------------
Function Add
if UPLOAD.FORM("title")="" then
call showerr("系统提示:标题不能为空!")
end if
if UPLOAD.FORM("content")="" then
call showerr("系统提示:内容不能为空!")
end if
DIM FILE
set file=upload.file("file")
<!--#include file="../../inc/FUNC.asp" -->
<!--#include file="../../inc/upload_5xsoft.inc" -->
<%
'-----------------------------
Dim rs
Dim sql
'-----------------------------
DIM UPLOAD
SET UPLOAD=NEW UPLOAD_5XSOFT
If UPLOAD.FORM("operation")="add" Then
call Add
elseif UPLOAD.FORM("operation")="edit" Then
call Edit
ELSE
call showerr("系统提示:操作无效!")
end if
'-----------------------------
Function Add
if UPLOAD.FORM("title")="" then
call showerr("系统提示:标题不能为空!")
end if
if UPLOAD.FORM("content")="" then
call showerr("系统提示:内容不能为空!")
end if
DIM FILE
set file=upload.file("file")
未传参数
或
传递的值与接收页面中判断的值大小写不一致.
改成如下试试,可以判断是否第二种情况.
If lcase(UPLOAD.FORM("operation"))="add" Then
call Add
elseif lcase(UPLOAD.FORM("operation"))="edit" Then
call Edit
ELSE
call showerr("系统提示:操作无效!")
end if
参数没有传过去哈!
If UPLOAD.FORM("operation")="add" Then
call Add
elseif UPLOAD.FORM("operation")="edit" Then
call Edit
ELSE
call showerr("系统提示:操作无效!")
end if