摘要: function snsShare(snsId, title, content, image, url) { var snsUrl; // 新浪 腾讯 要申请appkey switch (snsId) { case 1: snsUrl = 'http://service.weibo.com/share/share.php?appkey=123456'; snsUrl += '&title='+content+'&pic='+image+'&url='+url; break; case 2: ... 阅读全文
posted @ 2013-10-29 15:01 /折磨 阅读(610) 评论(0) 推荐(0) 编辑
摘要: // 模板引擎配置项var tmplOptions = { evaluate: /\{\{([\s\S]+?\}?)\}\}/g, interpolate: /\{\{=([\s\S]+?)\}\}/g, encode: /\{\{!([\s\S]+?)\}\}/g, use: /\{\{#([\s\S]+?)\}\}/g, useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\&# 阅读全文
posted @ 2013-10-29 14:13 /折磨 阅读(2156) 评论(0) 推荐(0) 编辑
摘要: http://phpqrcode.sourceforge.net 的代码很多 找了一个类 用用下载地址用法: require 'cQRCode.php'; $qr = new cQRCode($node_url, ECL_H); $qr->getQRImg()->save($qrimage_path, 90); 阅读全文
posted @ 2013-10-29 09:53 /折磨 阅读(2341) 评论(0) 推荐(0) 编辑
摘要: 使用PHP QR Code类库创建二维码使用举例浏览器输出:文件输出二维码include('phpqrcode/phpqrcode.php');// 二维码数据$data = 'http://s.bookphone.cn';// 生成的文件名$filename = '1111.png';// 纠错级别:L、M、Q、H$errorCorrectionLevel = 'L';// 点的大小:1到10$matrixPointSize = 4;QRcode::png($data, $filename, $errorCorrectionLe 阅读全文
posted @ 2013-10-29 09:29 /折磨 阅读(7666) 评论(0) 推荐(0) 编辑
摘要: $file->filename = trim(drupal_basename($_FILES['files']['name'][$source]), '.'); //在此行下 添加以下代码即可(包括编辑器上传都可用) //对文件进行重命名 防止中文文件名上传bug $file_ext = pathinfo($file->filename, PATHINFO_EXTENSION); $file->filename = date("Ymd") . '_' . date("His" 阅读全文
posted @ 2013-10-29 09:09 /折磨 阅读(238) 评论(0) 推荐(0) 编辑