nicye

导航

<2008年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

统计

与我联系

搜索

 

常用链接

留言簿(2)

我参加的小组

我参与的团队

我的标签

随笔档案

相册

Friends

最新评论

阅读排行榜

评论排行榜

2008年4月17日 #

实在不解的问题,和一个 回车 有关系吗?

a.shtml
<div>
<!--#include file="b.shtml"-->
</div>
b.shtml(文件结果没有回车)
<!--BOM-->
<href="http://www.betzc.com" target="_blank">盈彩网</a> | 
<href="http://www.123.com/product/">123</a>
用 IE7 访问 a.shtml
<div>

<!--BOM-->
<href="http://www.betzc.com" target="_blank">盈彩网</a> | 
<href="http://www.123.com/product/">123
</div>
123 后面的 </a> 到哪里去了?不解

b.shtml 最后面加个回车
<!--BOM-->
<href="http://www.betzc.com" target="_blank">盈彩网</a> | 
<href="http://www.123.com/product/">123</a>
用 IE7 访问 a.shtml
<div>

<!--BOM-->
<href="http://www.betzc.com" target="_blank">盈彩网</a> | 
<href="http://www.123.com/product/">123</a>

</div>


没话说了!!

下载两个文件

posted @ 2008-04-17 16:24 nicye 阅读(305) | 评论 (1)编辑

[视频] NicPetShop 开发全过程 第二回

http://www.ku1001.com/images/MyPetShop.rar

27.2 MB (28,561,389 字节)


附加说明.txt
video.vcp
是视频文件源

之前用 ViewletCam 生成的 .swf 播放到最后时会出现内存问题,导致无法播放的情况

同次 video.vcp 直接提供下载

请压缩 ViewletCam 后,运行 ViewletCam.exe 打开 video.vcp

ViewletCam 是绿色软件,第三方所有,请放心使用。

posted @ 2008-04-17 15:01 nicye 阅读(2076) | 评论 (7)编辑

asp.net 里 include UTF8 垃圾问题

很久以前,在我第一次使用 utf-8 编码做网站时,就遇到过 IE 下莫名其妙的空出一行(FireFox 下无问题),肉眼看不见,也就是 UTF-8 BOM 签名了,更多 BOM 知识请查找“Unicode BOM”。

先讲讲我的项目架构,IIS + .net 2.0 + SSI
暂且不讨论为什么要用 SSI,而不用其它技术(如 UserControl)

生成 index.shtml 肯定要带 BOM,其实带不带也不会影响页面上会出现空白行。
index.shtml 内容如下:

<html>
<body>

<!--#include file="head.shtml"-->
</body>
</html>


1、head.shtml 保存为 UTF-8 带    BOM 时,会出现空白行(页面元素当然不止这些)。
2、head.shtml 保存为 UTF-8 不带 BOM 时,会出现乱码,因为 SSInc.dll 加载这个文件时,不知道文件的编码(因为没有 BOM 签名),因此会按 GBK 来加载文件,最后乱码。。。

所以,正也不行,反也不行,只有最后一招了,也是迫不得已。。



改 index.shtml 为:
<html>
<body>

<!--<!--#include file="head.shtml"-->
</body>
</html>

在 head.shtml  的页开头加上
<!--BOM-->
内容。。。。。

意图 将 <!--#include 前的 <!-- 和 head.shtml 里的 BOM--> 用HTML注释掉,在 asp 下应该没有问题。
2年前,用 asp.net include 就发现一个问题,就是它的解释方法和 asp 完全不同,不信可以试试
<!--<!--#include file="head.shtml"-->
执行结果等效于
<!--#include file="head.shtml"-->




又试了半个小时,几近绝望,被 IE 这个小小的问题折磨。一阵乱试后发现

<!--#<!--#include file="head.shtml"-->

被忽略,暂时这样吧,期待更好的解决方案。。

posted @ 2008-04-17 12:00 nicye 阅读(2075) | 评论 (25)编辑