html语义化,是现在谈论得比较多的话题。那何谓html语义化,简单的说吧,就是要有良好的html结构,在剥离css后,依然能读懂一个页面的结构,能分清哪些是标题,哪些是内容。切忌不要用css让一个标签去表现另一个标签。 (continue reading…)
Author Archive
在线检测网页错误工具
没有站长可以保证自己的网页代码完全正确没有任何错误,特别是是否符合W3C标准,你可以通过以下测试来检查网站代码是否正确,无论你是asp的还是php的都可以哟。 (continue reading…)
Hosting Multiple SSL Web Sites On One IP Address With Apache 2.2 And GnuTLS (Debian Lenny)
This tutorial describes how you can host multiple SSL-encrypted web sites (HTTPS) on one IP address with Apache 2.2 and GnuTLS on a Debian Lenny server.
For more information on why this couldn’t be done prior to OpenSSL 0.98g or with GnuTLS please refer to http://en.wikipedia.org/wiki/Server_Name_Indication. (continue reading…)
FF SSL 证书错误
TLS v1.0 256 bit AES (1024 bit DHE_RSA/SHA)
TLS v1.0 256 bit AES (2048 bit DHE_RSA/SHA) (FF报错证书因为未提供证书发行链信而不被信任)
mysql 更改库表字段的编码
1.创建库时指定编码:create database testdb default charset GBK
2.修改库的编码: ALTER DATABASE `testtable` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
3.修改表的编码:ALTER TABLE `testtable` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin 4
4.修改字段的编码:
ALTER TABLE `tablename` CHANGE `dd` `dd` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
是将MYSQL数据库tablename表中 dd的字段编码改能够该为utf8
tt_content自定义type
h1-h6扩展:
1. 在根page的option里配置TS
TCEFORM.tt_content.header_layout.addItems.99 = test
2. 在page.setup的TS里配置:
lib.stdheader = COA
lib.stdheader{
10.99 < .10.1
10.99.fontTag = |
}
({register:headerStyle}{register:headerClass}为系统自动生成, 可自定义)
Indentation and Frames 扩展:
TCEFORM.tt_content.section_frame.addItems.99 = register frame
tt_content.stdWrap.innerWrap.cObject{
99 =< tt_content.stdWrap.innerWrap.cObject.default
99.15.value = register_now
}
Frontend layout
TCEFORM.pages.layout.altLabels.0 = Default
TCEFORM.pages.layout.altLabels.1 = layout one
TCEFORM.pages.layout.altLabels.2 = layout two
TCEFORM.pages.layout.altLabels.3 = layout three
TCEFORM.pages.layout.addItems.4 = layout new1
WCAG Validator
对 Web 开发者来说,Techniques for WCAG 2.0 提供了一份具体的操作指南。实际操作时,可配合校验工具来减轻工作量, 校验工具不是很好找,我采用的是 IDI Web Accessibility Checker TAW Online totalvalidator (continue reading…)
html2ps之fpdf, pdflib生成矢量Pdf
PDFLIB生成矢量PDF原理是调用一个矢量的pdf模板,在此基础上用html2ps把html显示到pdf中.
FPDF生成矢量PDF原理是扩展fpdf引入fpdf_eps function, 在适当位置调用ImageEps()插入矢量eps or ai文件. (continue reading…)
PHP判断字符串编码是否为utf8的函数
// Returns true if $string is valid UTF-8 and false otherwise.
function is_utf8($word)
{
if (preg_match("/^([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){1}/",$word) == true || preg_match("/([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){1}$/",$word) == true || preg_match("/([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){2,}/",$word) == true)
{
return true;
}
else
{
return false;
}
} // function is_utf8