下例:获得2012-5-1号之前一天的日期
<?php
//将时间点转换为时间戳
$date = strtotime('2012-5-1');
//输出一天前的日期,在时间戳上减去一天的秒数
echo date('Y-m-d',$date - 1*24*60*60);
?>
下例:获得2012-5-1号之前一天的日期
<?php
//将时间点转换为时间戳
$date = strtotime('2012-5-1');
//输出一天前的日期,在时间戳上减去一天的秒数
echo date('Y-m-d',$date - 1*24*60*60);
?>
function calendarnew($starttime = 0) {
global $db, $tablepre, $timestamp, $site_timeoffset, $site_dateformat, $curtime;
下面实例是告诉我们在论坛有看到关于多少秒钟前发了帖子等这些功能,
分析
如
$array = file('phprm.com.txt');
//////////////
//////无限分类的数据库设计及样例
//////////////
mysql> create database db_kind;
Query OK, 1 row affected
html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function Check(){
//alert('dddd');
for(i=1; i<9; i++){
if(document.getElementById('v'+i).value == ''){
document.getElementById('v'+i).name = 'uu';
}
}
}
里面有各种大家开发中常用到的种编码如uft8->gbk gbk转utf8 繁体转简体 简体转繁体 utf8转unicode gbk转拼音 Ascii转拼音 等
下面举出了三种获取文件缀名方法代码有需要的朋友可以参考一下。
php教程获取上传文件名的文件类型
再看