难道没人会处理图片???

taylermail 2004-12-21 10:31:17
下面这个网页可以正常显示dwf文件(利用Autodesk Express Viewer工具)

cad_view.asp

<%
if Request.QueryString ("pipe_num")<>"" then
pipe_num=Request.QueryString ("pipe_num")
else
pipe_num=543

end if
%>
<html>

<body>

<tr height="90%">
<td colspan="10" align="center">
<object id = "viewer"
classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"
codebase="http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab" width="100%" height="100%" >
<param name = "Src" value="images/<%=pipe_num%>.dwf">
</td>
</tr>
<br>

</body>

</html>

改进版?还是不行? <%
dim s,dwf,num
if Request.QueryString ( "pipe_num ") < > " " then
num=Request.QueryString ( "pipe_num ")
else
num=543

end if
set connGraph=server.CreateObject( "ADODB.connection ")
conngraph.ConnectionString =session( "connection_string ")
conngraph.Open
set rec=server.createobject( "ADODB.recordset ")
strsql= "select * from pipe_map where pipe_num=' "&num& "' "
rec.open strsql,connGraph,1,1
if rec.RecordCount=0 then
if len(Request.QueryString( "pipe_num ")) <=4 then
rec.Close
rec.Open "select * from pipe_map where pipe_num='暂无管段图' ",connGraph,1,1
else
rec.Close
rec.Open "select * from pipe_map where pipe_num='暂无单卡图' ",connGraph,1,1
end if
end if

'Response.ContentType = "image/dwf "
dwf=rec( "pipe_map ").GetChunk(750000)
'Response.Write dwf
'Response.Write
set rec=nothing
set connGraph=nothing
% > >
<html >

<body >
<br >
<tr height= "90% " >
<td colspan= "10 " align= "center " >
<object id = "viewer "
classid= "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF "
codebase= "http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab " width= "100% " height= "100% " >
<param name = "Src " value= "<%=dwf%> " >
</td >
</tr >
<br >

</body >

</html >
...全文
72 点赞 收藏 4
写回复
4 条回复
Coyozo 2004年12月21日
头太晕
回复 点赞
Coyozo 2004年12月21日
沙发
回复 点赞
taylermail 2004年12月21日
up
回复 点赞
taylermail 2004年12月21日
up,没有人会啊 ?呼唤高手
回复 点赞
发动态
发帖子
ASP
创建于2007-09-28

1.9w+

社区成员

35.7w+

社区内容

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区公告
暂无公告