yjanb11

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年6月16日

摘要: <?phpdefined('IN_TS') or die('Access Denied.');// 用户是否登录$userid = aac('user') -> isLogin();if($TS_USER['user']['userid']==1){$dbuserid=$db -> once_fetch_assoc("SELECT userid FROM `ts_user` ORDER BY rand( ) LIMIT 1");}else{$dbuserid=$TS_USER[ 阅读全文
posted @ 2012-06-16 13:12 yjanb11 阅读(263) 评论(0) 推荐(0) 编辑

2011年6月4日

摘要: Source for file saet.ex.class.phpDocumentation is available at saet.ex.class.php key = $key; $this->secret = $secret; } function __toString() { return "OAuthConsumer[key=$this->key,secret=$this->secret]"; } } /** * @ignore */ class OAuthToken { // access tokens and request tokens 阅读全文
posted @ 2011-06-04 01:54 yjanb11 阅读(404) 评论(0) 推荐(0) 编辑

2011年5月15日

摘要: 多文件上传处理类,可能有些地方写的不完全,可以在此基础上做出相应的修改。引用: <?php include("UploadFile.php"); if ($_GET['action'] == 'save') { $up = new upload(); $up->set_dir(dirname(__FILE__).'/upload/','{y}/{m}'); $up->set_thumb(100,80); $up->set_watermark(dirname(__FILE__).' 阅读全文
posted @ 2011-05-15 14:36 yjanb11 阅读(117) 评论(0) 推荐(0) 编辑

摘要: PHP无限级分类示例,一个简单的PHP无限级分类示例,本代码是在改进网上的一实例,转移和添加功能已经本人测试通过,放心使用,直接运行当前文件便可PHP无限级分类示例.本分类方法的优势:1,数据库结构简单,只有 cid pid name 三个字段,无任何冗余字段2,不使用递归查询,所有操作只需一条sql语句3,所有数据在读取一次数据库后,在数组内进行分析处理,节省数据库服务器资源<?php header("Content-type: text/html; charset=utf-8"); /** +------------------------------------ 阅读全文
posted @ 2011-05-15 14:33 yjanb11 阅读(231) 评论(0) 推荐(0) 编辑

摘要: 利用PHP自带生成图片函数,再通过session来存取当前值来获的验证 <?php session_start(); function random($len) { $srcstr="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; mt_srand(); $strs=""; for($i=0;$i<$len;$i++){ $strs.=$srcstr[mt_rand(0,35)]; } return strtoupper($strs); } $str=random(4); $width = 50; $height 阅读全文
posted @ 2011-05-15 14:31 yjanb11 阅读(156) 评论(0) 推荐(0) 编辑