天天看點

ActiveX 部件不能建立對象: ‘scripting.FileSystemObject’

澶у?跺ソ锛???瑙????锛?????浣?浠????????ㄦ??????瑙e?蟲?規?:

1.棣???锛???涓???浠??ラ?芥??杩?绉????碉?濡????????跺???锛?涓?浼??挎??锛?涓?浼??誇???锛???棰?灏變?濂藉????濡???????韬?灏辨????棰?锛??e氨????scrrun.dll????浠舵??娉ㄥ????浣跨??egsvr32 scrrun.dll灏卞??浠?

2.VB????et fso=CreateObject(??Scripting.FileSystemObject??)

asp??杈圭??set fso=Server.CreateObject(??Scripting.FileSystemObject??)

3.??涓?涓?浣???娴?瑙??????涓???绂??ㄤ?ActiveX

4.???″?ㄤ?????fso

5.绂?fso锛?寰?澶????圭??Progid,?鴻??風????璇?锛?

???″?ㄥ?矽薄 ??璇? ??ASP 0177 : 800401f3??

Server.CreateObject 澶辮觸

/asp/test.asp, 琛?3

??????????????

浣???浠ョ??娴?杩?涓??瑰?????闆?兼?ユ?娲繪??????绋?锛?

Set Fs=Server.CreateObject(??Scripting.FileSystemObject8??)??-杩?涓?8灏辨??锛?浣???浠ユ?㈡?㈢??娴?璇?浜?

6.

搴?璇ユ??FSO缁??抽??浜?锛?浣?杩?琛? regsvr32 scrrun.dll ?跺??????涓?涓? IIS ??????

?戒?琛?锛?绯葷? ??win2003??锛???瑁?绯葷???灏卞?虹?拌?涓???棰?浜?

??????????????????????????????????????????????-

??寤?so瀵矽薄锛?璇?娉?瑕?瑙???锛?

set fso=Server.CreateObject(??Scripting.FileSystemObject??)

濡???浠??朵?琛?锛??ㄩ?挎??㈤???ヨ????″?ㄦ??????FSO??

绋?搴?濡?涓?锛?

<%@ LANGUAGE = VBScript.Encode %>

<%set conn=server.createobject(??adodb.connection??)

conn.open ??filedsn=d:\test\file.dsn;dbq=d:\test\test.mdb;?? ??娉ㄦ???逛?璺?寰?

set rs=server.createobject(??adodb.recordset??)

sql=??select * from test??

rs.open sql,conn,1,1

%><html>

<head>

<meta content=??Microsoft FrontPage 5.0??gt;

<meta content=??FrontPage.Editor.Document??>

<meta http-equiv=??Content-Type?? content=??text/html; charset=gb2312??gt;

<title>?闆緩缃?椤?1</title>

<script Language=VBScript>

function print_onclick() //???闆?芥??

dim label

label=document.printinfo.label.value //?峰?HTML椤甸?㈢???版??

set objfs=CreateObject(??Scripting.FileSystemObject??) //??寤?ileSystem缁?浠跺?矽薄??瀹?渚?

set objprinter=objfs.CreateTextFile (??LPT1:??,true) //寤虹??涓????版?虹??杩???

objprinter.Writeline(??__________________________________??) //杈??烘???扮????瀹?

objprinter.Writeline(??| |??)

objprinter.Writeline(??| ?ㄦ???扮???版????锛???&label& ?? |??)

objprinter.Writeline(??| |??)

objprinter.Writeline(??|_________________________________|??)

objprinter.close() //??寮?涓????版?虹??杩???

set objprinter=nothing

set objfs=nothing // ?抽??FileSystem缁?浠跺?矽薄

end function

</script>

</head>

<body>

<FORM >

<INPUT type=??button?? value=??????gt;>?? > //璋??ㄦ???闆?芥??

<INPUT type=hidden value=<%=rs(??name??)%>> //淇?瀛????″?ㄧ??浼??ョ???版??

<% rs.close

set rs=nothing

conn.close

set conn=nothing

%></form>

</body></html>

[color=orange]7.?????哄?ㄧ?ㄤ?涓??㈢???規?娌℃??瑙e?抽??棰?锛??ㄤ??㈢???規?瑙e?充???棰?锛?澶у?朵?濡ㄥ??浠ヨ??璇?锛???寮?Internet Explorer ??宸ュ?封????????涓???????椤光??涓???锛????燴??瀹??ㄢ????涓???????瀹?涔?绾у??????椤瑰?★?灏?绗?涓?椤光??瀵規病????璁頒負瀹??ㄧ??activex?т歡杩?琛???濮?????????杩?琛???璁劇疆???????ㄢ???沖???? [/color]

??甯???锛??ㄦ??绋?搴??????匡?杞?杞借?鋒敞???哄?锛?https://javaforall.cn/159006.html?????炬?ワ?https://javaforall.cn