易截截图软件、单文件、免安装、纯绿色、仅160KB

php计算日期差天数

<?PHP
//今天与2004年10月27日相差多少天
$Date_1=date("Y-m-d");
$Date_2="2004-10-27";
$d1=strtotime($Date_1);
$d2=strtotime($Date_2);
$Days=round(($d1-$d2)/3600/24);
Echo   "今天与2004年10月27日相差".$Days."天";
Echo "<br>";
//今天到2008年9月9日还有多少天
$Date_1=date("Y-m-d");
$Date_2="2008-09-09";
$d1=strtotime($Date_1);
$d2=strtotime($Date_2);
$Days=round(($d2-$d1)/3600/24);
Echo   "今天到2008年9月9日还有".$Days."天";
?>
//---------------------------------------------
                   $arrayStartDate =explode("/",$myStartDate);
                   $arrayEndDate = explode("/",$myEndDate);
                  
                   $jdStartDate = cal_to_jd(CAL_GREGORIAN,$arrayStartDate[1],$arrayStartDate[0],$arrayStartDate[2]);
                   $jdEndDate = cal_to_jd(CAL_GREGORIAN,$arrayEndDate[1],$arrayEndDate[0],$arrayEndDate[2]);
      
                    $duration = $jdEndDate - $jdStartDate + 1;
统计几天以后到期的数据
datediff(yxdate_star,now())
返回 天数 = yxdate_star-now()


相关文档:

windows下apache,mysql,php安装日记

今天废了一天的时间来从新把环境搭建好:做个笔记
安装顺序:
apache->php->mysql
一些注意的地方记下来吧:
1. apache 支持 php
    apache 配置文件下:需要修改的地方:
       i.  PHPIniDir "F:/programs/php/"
    &n ......

PHP的ereg()与eregi()的不同及相同点。对比

ereg()
字符串比对解析。
语法: int ereg(string pattern, string string, array [regs]);
返回值: 整数/数组
函数种类: 资料处理
内容说明
本函数以 pattern 的规则来解析比对字符串 string。比对结果返回的值放在数组参数 regs 之中,regs[0] 内容就是原字符串 string、regs[1] 为第一个合乎规则的字符串、regs[2 ......

php 学习

<?php
    $txt = 'Hello world';
    echo $txt;
?>
<br/>
字符串连接(.)
<br/>
echo 'Hello world'. "" . '1234'  输出: 
<?php
    $txt1 = 'Hello world';
    $txt2 = '1234';
    ......

Installing PHP APC on GNU/Linux Centos 5

原贴:http://2bits.com/articles/installing-php-apc-gnulinux-centos-5.html
Published Mon, 2008/03/24 - 13:49, Updated Wed, 2009/07/15 - 23:40
Complex PHP applications, such as Drupal, can gain a lot of performance benefits from running a PHP op-code cache/accelerators
.
APC,
Alternate ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号