在线检测网页错误工具

没有站长可以保证自己的网页代码完全正确没有任何错误,特别是是否符合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报错证书因为未提供证书发行链信而不被信任)

(continue reading…)


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

mysql查询字段

DESC `be_groups`
SHOW FULL FIELDS FROM `be_groups`

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

jQuery实现图片延迟加载

在浏览有些网站时,发现图片是在下拉滚动条时才加载,这是一个很不错的用户体验。这一效果是通过JavaScript 编写的 jQuery 插件实现的,它可以延迟加载长页面中的图片. 在浏览器可视区域外的图片不会被载入, 直到用户将页面滚动到它们所在的位置. 这与图片预加载的处理方式正好是相反的.在包含很多大图片长页面中延迟加载图片可以加快页面加载速度. 浏览器将会在加载可见图片之后即进入就绪状态. 在某些情况下还可以帮助降低服务器负担. 有些WordPress主题也具备了此功能。

(continue reading…)


Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress