图片上传以后客户端显示不出,
图片上传以后客户端显示不出,是什么原因啊?代码是:
<tr>
<td width= "130 " rowspan= "6 " align= "left " valign= "top " bgcolor= "#930000 "> <marquee behavior= "scroll " direction= "up " align= "top " onMouseOut= " " onMouseOver= " ">
<img src= "login/upimages/ <%= Server.MapPath((read_flash.Fields.Item( "admin_Url ").Value)) %> " >
</marquee> </td>
------解决方案--------------------浏览器里,右键看图片的属性,url对不对?再根据url改代码。
------解决方案--------------------在数据库读出。login 这个目录是在根目录下么?
是的话:
上传路径写成 "/login/upimages/ "
------解决方案--------------------浏览器里查看源代码。 <img src= "...后面是什么。
主要是file:///G:/文件/中国品牌杂志社/20076219211278243.gif和web目录要映射正确
比如Login/upimages/在iis映射到 file:///G:/文件/,
那么应该是 <img src= "Login/upimages/中国品牌杂志社/20076219211278243.gif ">
------解决方案--------------------文件夹为中文,有时浏览器会解析出错。改为英文的测试下看看
------解决方案--------------------Server.MapPath不需要了,在可户端哪还能用绝对路径?
------解决方案-------------------- <tr>
<td width= "130 " rowspan= "6 " align= "left " valign= "top " bgcolor= "#930000 "> <marquee behavior= "scroll " direction= "up " align= "top " onMouseOut= " " onMouseOver= " ">
<img src= "login/upimages/ <%= (read_flash.Fields.Item( "admin_Url ").Value) %> " >
</marquee> </td>
------解决方案-------------------- <tr>
<td width= "130 " rowspan= "6 " align= "left " valign= "top " bgcolor= "#930000 "> <marquee behavior= "scroll " direction= "up " align= "top " onMouseOut= " " onMouseOver= " ">
<img src= "login/upimages/ <%= read_flash.Fields.Item( "admin_Url ").Value %> " >
</marquee> </td>