php
xiongdi9456
这个作者很懒,什么都没留下…
展开
-
chart制作
chart.class.php<?phpclass Chart { private static $_first = true; private static $_count = 0; private $_chartType; private $_data;转载 2013-08-26 12:51:04 · 706 阅读 · 0 评论 -
php 根据指定日期,求出该日期所在周的始末时间和所在月的始末时间
//the Saturday of this week$lastday=date("Y-m-d",strtotime("2013-08-28 Saturday"));echo $lastday;//the first day of this week$endlastday=date("Y-m-d",strtotime("2013-09-27 Saturday"));$endfirstday=d原创 2013-08-29 10:17:34 · 818 阅读 · 0 评论 -
xampp新配置,添加一个zend的新站
例如‘ http://localhost:8081/ 连接到一个站的index.php配制方法一。httpd.conf 给Listen增加一个端口,以前是listen 80,现在增加一个,成为Listen 80Listen 8081并且要增加一个ServerNameServerName localhost:8081--------原创 2013-12-05 08:54:23 · 731 阅读 · 0 评论 -
PHP生成随机字符串,必须包含三项 大写小写数字
public function random_str() { $str = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $str = str_shuffle($str); return substr($str, 0,8); }在别的function里添加一个正则认证,防止某种形式漏掉转载 2014-01-09 12:44:30 · 1230 阅读 · 0 评论 -
下载
$rootPath=$_SERVER['DOCUMENT_ROOT'];$filePath = $_GET [filePath];if ($filePath == "")return null;else{$servername = $_SERVER["HTTP_HOST"];$needstr="/^(http:\/\/)?([^\/]+)/i";if(pre原创 2014-06-09 10:54:19 · 482 阅读 · 0 评论 -
两个时间差几天几小时
$time1=strtotime("2014-6-15 00:00:00"); $time2=strtotime("now"); $sec=$time1-$time2; if($sec < 0){ $sec = -$sec; $datedis['0']="-"; }else{ $datedis['0']="+"; } $year=floor($sec/3600/24原创 2014-06-09 10:18:25 · 536 阅读 · 0 评论 -
ip限制功能
使用方法原创 2014-07-23 11:22:00 · 609 阅读 · 0 评论