日期:2014-05-17  浏览次数:21028 次

添加信息问题
我提交的时候老是出错,显示
错误类型:
Microsoft   VBScript   运行时错误   (0x800A01A8)
缺少对象:   'file(...) '
/new/addnews_do.asp,   第   15   行
然后显示信息页面的数据全是问号,这些数据全是从数据库中取出的,其他的不是数据库的数据显示正常,

一下是我的addnews_do.asp的代码
<!--#include   file= "conn.asp "-->
<!--#INCLUDE   FILE= "upload.asp "   -->

<%
function   changechr(str)  
        changechr=replace(replace(replace(replace(str, " < ", "&lt; "), "> ", "&gt; "),chr(13), " <br> "), "   ", "&nbsp; ")  
        changechr=replace(replace(replace(replace(changechr, "[sayyes] ", " <img   src= "), "[b] ", " <b> "), "[red] ", " <font   color=CC0000> "), "[big] ", " <font   size=7> ")  
        changechr=replace(replace(replace(replace(changechr, "[/sayyes] ", "> </img> "), "[/b] ", " </b> "), "[/red] ", " </font> "), "[/big] ", " </font> ")  
end   function

dim   upload,access_file,pic_file
Dim   fso

set   upload=new   upload_5xSoft
set   access_file=upload.file( "N_accessory ")             //这是第15行
set   pic_file=upload.file( "N_picture ")

if   pic_file.filesize> 100   then

PhotoPath= "files/ "
MaxPhotoSize= "1024000 "

fileExt=lcase(right(pic_file.filename,4))

if   fileExt <> ".jpg "   and   fileExt   <> ".gif "   then
response.write   " <script   language= 'javascript '> "
response.write   "alert( '非指定的图片格式! '); "
response.write   "history.go(-1); "
response.write   " </script> "
response.end
end   if  
if   pic_file.filesize> MaxPhotoSize   then
response.write   " <script   language= 'javascript '> "
response.write   "alert( '文件大小超过了 "&MaxPhotoSize/1024& "K限制! '); "
response.write   "history.go(-1); "
response.write   " </script> "
response.end
end   if  

set   fso   =   CreateObject( "Scripting.FileSystemObject ")
path=server.mappath(PhotoPath)
if   fso.folderexists(path)=false   then
fso.createfolder(path)
end   if
set   fso=nothing

if   right(PhotoPath,1) <> "/ "   then  
PhotoPath=PhotoPath& "/ "  
end   if

randomize
rndNumber   =   rnd*100000000
rndNumber   =   int(rndNumber)

datetime=year(date)&month(date)&day(date)&hour(now)&minute(now)&second(now)
pic_filename=datetime&rndNumber&fileEXT

'response.write   upload.form( "news_pic ")&filename
'response.end

pic_file.SaveAs   Server.mappath(PhotoPath&pic_filename)
end   if


if   access_file.filesize> 100   then