怎么用ASP读配置文件(ini),最好有例子!!

zoujian 2001-07-18 10:51:49
...全文
169 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tripofdream 2001-07-18
  • 打赏
  • 举报
回复
ini就是文本
Rain_Z001 2001-07-18
  • 打赏
  • 举报
回复
和读文本一样!??
tripofdream 2001-07-18
  • 打赏
  • 举报
回复
关键字提示:
filesystemobject
open
readline
MSDN里看看
hydnoahark 2001-07-18
  • 打赏
  • 举报
回复
还有一种就是写一个COM调用API读INI文件
wybm 2001-07-18
  • 打赏
  • 举报
回复
On Error Resume Next
ini_file="用ASP读取的配置文件(ini)"
set objFileSys=server.createObject("Scripting.FileSystemObject")
If not objFileSys.FileExists(ini_file) then
On Error Goto 0
set objFileSys=Nothing
Response.Write "The ini file - "&ini_file&" is not exist!"
Response.End
Else

set objReadTextFile=objFileSys.openTextFile(ini_file,1,1,0)
If Err.number<>0 then
Err.Clear
On Error Goto 0
Response.Write "Error in reading ini file - "&ini_file
response.end
End if
thetext=objReadTextFile.readall
end if
objReadTextFile.close
set objReadTextFile=Nothing
set objFileSys=Nothing
On Error Goto 0

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧