首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请问图像取相对路径的有关问题,取不到绝对路径

2013-10-16 
请教图像取相对路径的问题,取不到绝对路径 object idOBJECT1 codebasehttp://download.macromedia.c

请教图像取相对路径的问题,取不到绝对路径

 <object id="OBJECT1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
                                height="500" width="630" align="top" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                                viewastext>
                                <param name="_cx" value="16669">
                                <param name="_cy" value="13229">
                                <param name="FlashVars" value="">
                                <param name="Movie" value="..\tupian\T3CQT30302.jpg">
                                <param name="Src" value="..\tupian\T3CQT30302.jpg">
                                <param name="WMode" value="Window">
                                <param name="Play" value="-1">
                                <param name="Loop" value="-1">
                                <param name="Quality" value="High">
                                <param name="SAlign" value="">
                                <param name="Menu" value="-1">
                                <param name="Base" value="">
                                <param name="AllowScriptAccess" value="">
                                <param name="Scale" value="ShowAll">
                                <param name="DeviceFont" value="0">
                                <param name="EmbedMovie" value="0">
                                <param name="BGColor" value="FFFFFF">
                                <param name="SWRemote" value="">
                                <param name="MovieData" value="">
                                <param name="SeamlessTabbing" value="1">
                                <param name="Profile" value="0">
                                <param name="ProfileAddress" value="">


                                <param name="ProfilePort" value="0">
                                <param name="AllowNetworking" value="all">
                                <param name="AllowFullScreen" value="false">
                                <embed src="T3CQT30302.jpg" quality="high" bgcolor="#FFFFFF" width="760" height="400"
                                    name="安全" align="" type="application/x-shockwave-flash" quality="high" wmode="transparent"
                                    pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" wmode="transparent"> </embed>
                            </object>



此控件取得是相对路径value="..\tupian\T3CQT30302.jpg"
对于value="D:\tupian\T3CQT30302.jpg"不能取
我的图像都存在项目之外的文件里,怎样可以变成相对路径进行读取?
[解决办法]
只能使用网站虚拟路径之内的文件。
[解决办法]
是的,可以把这个文件发布到iis的虚拟目录下,就可以直接用http://192.168.0.1/tupian/T3CQT30302.jpg之类的链接了。
[解决办法]
引用:
Quote: 引用:

只能使用网站虚拟路径之内的文件。

版主,意思就是说在项目中读取的图像都只能在项目所在目录下吗


设计思路肯定这样,要放在虚拟目录下,否则到发布时图片找不到路径,那是特别麻烦的事情.

热点排行