风讯官方论坛FoosunCMS交流区插件讨论关于海之鲲修改版有的用户使用时生成文件提示“文件已存在”的解决方法!

1  /  1  页   1 跳转 查看:1504

标题: 关于海之鲲修改版有的用户使用时生成文件提示“文件已存在”的解决方法!

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

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


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


更新日期:7-17    9:00


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


QQ:10438049


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

引用
 

主要原因是我这里测试很正常,因此请有问题的把这个代码测试一下看是否可以解决!
引用
 

改了还是出错啊!


生成栏目时!



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编辑过]

引用
 

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



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

引用
 


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

没有权限

/admin/Refresh/Function.asp,行495

引用
 

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








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

没有权限

/admin/Refresh/Function.asp,行495

引用
 

请问楼上的用的是修改版吗?
引用
 

是你的6-6 的


还修改的


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

引用
 

请联系我!
引用
 

我就是乐府诗啊!

引用
 

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


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

没有权限

/admin/Refresh/Function.asp,行495


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

引用
 

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


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

引用
 

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


谢谢鲲哥啊!

引用
 
1  /  1  页   1 跳转

版权所有 Foosun.NET  NewsCMS.com  NewsIDC.COM  Sitemap

Powered by Discuz!NT 2.0.1115    Copyright © 2001-2008 Comsenz Inc.
Processed in 0 second(s) (Cached).
返顶部