我从山中来

我是网络一看客
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年3月28日

摘要: 解决方法:先用函数base64_encode() — 使用 MIME base64 对数据进行编码标题字符串前加编码类型例如: =?UTF-8?B?标题字符串后加:?=邮件header说明Content-type — 防止邮件正文也乱码$to = 'xinple@example.com';$subject = "=?UTF-8?B?".base64_encode('邮件标题')."?=";$headers = 'MIME-Version: 1.0' . "\r\n";$headers 阅读全文

posted @ 2011-03-28 10:42 我从山中来 阅读(218) 评论(0) 推荐(0) 编辑

摘要: CSS方法:.img {max-width:600px;width:600px;width:e­xpression(document.body.clientWidth>600?"600px":"auto");overflow:hidden;}JQuery方法:$("img").each(function(){ if($(this).width() > $(this).parent().width()) { $(this).width("100%"); }}); 阅读全文

posted @ 2011-03-28 08:21 我从山中来 阅读(129) 评论(0) 推荐(0) 编辑

摘要: 为了不在每个表中重复设置, 可以在database.yml中进行全局设定.all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=xxx' username: root password: attributes: default_table_charset: utf8 default_table_collate: utf8_general_ci或者在“/config/ProjectConfiguration.class.php”中设定.public function c 阅读全文

posted @ 2011-03-28 08:17 我从山中来 阅读(350) 评论(0) 推荐(0) 编辑