风讯官方论坛

首页 » FoosunCMS交流区 » 插件讨论 » 关于海之鲲修改版有的用户使用时生成文件提示“文件已存在”的解决方法!
海之鲲 - 2005-7-16 13:46:00

下载下面的文件解压覆盖:admin/Refresh/Function.asp


该补丁为只适合于海之鲲的修改版的测试补丁,请测试后反馈!


更新日期:7-17    9:00


晕~~~~无法上传文件,想测试的请找我索要!


QQ:10438049


[此贴子已经被作者于2005-7-17 9:09:53编辑过]

海之鲲 - 2005-7-16 14:33:00
主要原因是我这里测试很正常,因此请有问题的把这个代码测试一下看是否可以解决!
forgon - 2005-7-17 00:07:00

改了还是出错啊!


生成栏目时!



Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/admin/Refresh/Function.asp,行495


Sub CheckFolderExists(Path,ClassEName,DatePath,FileName) '检查目录
Dim FSOObj,TempPath,FolderObj,FileObj,ItemObj
Set FSOObj = Server.CreateObject("Scripting.FileSystemObject")
TempPath = Server.MapPath(Path)
if FSOObj.FolderExists(TempPath) = False then FSOObj.CreateFolder(TempPath)
TempPath = TempPath & "\" & ClassEName
if FSOObj.FolderExists(TempPath) = False then
  FSOObj.CreateFolder(TempPath)
  if DatePath<>"" then
Dim PathArray
PathArray = Split(DatePath,"/")
TempPath = TempPath & "\" & PathArray(0)
if FSOObj.FolderExists(TempPath) = False then FSOObj.CreateFolder(TempPath)
TempPath = TempPath & "\" & PathArray(1)
if FSOObj.FolderExists(TempPath) = False then FSOObj.CreateFolder(TempPath)
end if
else
  Set FolderObj = FSOObj.GetFolder(TempPath)  --->> 这个地方就是491行
  Set FileObj = FolderObj.Files
  for Each ItemObj in FileObj
  if InStr(LCase(ItemObj.name),FileName) then
    FSOObj.DeleteFile TempPath & "\" & ItemObj.name  --->>行495
  end if
  Next
end if
Set FSOObj = Nothing
End Sub


[此贴子已经被作者于2005-7-17 0:25:48编辑过]

forgon - 2005-7-17 00:10:00

再试试生成新闻时,却是:



Microsoft VBScript 运行时错误 错误 '800a004c'

路径未找到

/admin/Refresh/Function.asp,行79


Sub FSOSaveFile(Content,LocalFileName)    '子类函数替换为下面的函数,请大家测试后如果问题解决,我将重新发布!
Dim FileObj,FilePionter,sPath,ArrPath,TempPath,i
Set FileObj=Server.CreateObject("Scripting.FileSystemObject")
sPath=replace(Server.MapPath(LocalFileName),"//","/")
ArrPath = Split(sPath,"/")
for i=0 to UBound(ArrPath)-1
  TempPath = TempPath & "/" & ArrPath(i)
if FileObj.FolderExists(TempPath) then FileObj.CreateFolder(TempPath)
next
Set FilePionter = FileObj.CreateTextFile(Server.MapPath(LocalFileName),True) '创建文件  ---〉〉这里79行
FilePionter.Write Content
FilePionter.close    '释放对象
Set FilePionter = Nothing
Set FileObj = Nothing
End Sub

forgon - 2005-7-17 00:25:00

Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/admin/Refresh/Function.asp,行495

forgon - 2005-7-17 00:59:00

全面生成没问题。但是第二次生成栏目时就有问题了!








Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/admin/Refresh/Function.asp,行495

海之鲲 - 2005-7-17 09:02:00
请问楼上的用的是修改版吗?
forgon - 2005-7-17 11:18:00

是你的6-6 的


还修改的


if FSOObj.FolderExists(TempPath) then FSOObj.CreateFolder(TempPath)

海之鲲 - 2005-7-18 11:55:00
请联系我!
forgon - 2005-7-18 12:26:00

我就是乐府诗啊!

海之鲲 - 2005-7-18 12:50:00

哦~~~~~如果你使用了这个测试补丁,而出现了:


Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/admin/Refresh/Function.asp,行495


那么可以确定的说你没有删除文件的权限,你只有建立文件的权限,请找空间供应商解决!

海之鲲 - 2005-7-18 14:13:00

郁闷~~~~你的目录设置错误引起的,你的问题已解决,过.....


请还有这个问题测试,并将测试后的结果告之!

gxhj - 2005-7-25 15:28:00

在站长网下的714版没问题。


谢谢鲲哥啊!

1
查看完整版本: 关于海之鲲修改版有的用户使用时生成文件提示“文件已存在”的解决方法!