当前位置: 首页>>代码示例>>PHP>>正文


PHP date_format2函数代码示例

本文整理汇总了PHP中date_format2函数的典型用法代码示例。如果您正苦于以下问题:PHP date_format2函数的具体用法?PHP date_format2怎么用?PHP date_format2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了date_format2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: callmsg

    $db->query("UPDATE " . __TBL_GROUP_MAIN__ . " SET nicknamesexgradephoto_s1='{$nicknamesexgradephoto_s}' WHERE userid1=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_MAIN__ . " SET nicknamesexgradephoto_s2='{$nicknamesexgradephoto_s}' WHERE userid2=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_MAIN__ . " SET nicknamesexgradephoto_s3='{$nicknamesexgradephoto_s}' WHERE userid3=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_USER__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_BK__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_WZ__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_WZ__ . " SET endnicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE enduserid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_WZ_BBS__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_CLUB_USER__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    $db->query("UPDATE " . __TBL_GROUP_CLUB_BBS__ . " SET nicknamesexgradephoto_s='{$nicknamesexgradephoto_s}' WHERE userid=" . $cook_userid);
    //ͬ��end
    callmsg("�޸ijɹ���", "a2.php");
}
$birthday1 = date_format2($row['birthday'], '%Y');
$birthday2 = date_format2($row['birthday'], '%m');
$birthday3 = date_format2($row['birthday'], '%d');
?>
<!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=gb2312" />
<title><?php 
echo $Global['m_titile'];
?>
</title>
<link href="my.css" rel="stylesheet" type="text/css">
<style type="text/css"> 
/* main1 */
.main1 {width:754px;height:28px;margin-left:28px;overflow:hidden;margin-top:15px;background-image:url(images/sontgg.gif);padding-left:16px;}
.main1_tselect {float:left;width:70px;height:27px;background:#F0FAE9;border-left:#CCE1B5 1px solid;border-top:#CCE1B5 1px solid;border-right:#CCE1B5 1px solid;margin-right:11px;text-align:center;line-height:26px;color:#6F9F00;}
.main1_t {float:left;width:70px;height:26px;border:#CCE1B5 1px solid;margin-right:11px;text-align:center;line-height:26px;}
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:a1.php

示例2: date_format2

          </tr>
          <tr>
            <td height="18" align="center"  <?php 
        echo $bg;
        ?>
><font color="#666666"><?php 
        echo $rows['title'];
        ?>
</font></td>
          </tr>
          <tr>
            <td height="18" align="center"  <?php 
        echo $bg;
        ?>
><font color="#999999"><?php 
        echo date_format2($rows['addtime'], '%Y.%m.%d');
        ?>
</font></td>
          </tr>
          <tr>
            <td height="20" align="center" <?php 
        echo $bg;
        ?>
><?php 
        if ($rows['ifmain'] == 1) {
            ?>
                <font color="#FF0000">★主照片</font>
                <?php 
        } else {
            ?>
                <?php 
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:i_group_photo_list.php

示例3: date_format2

        echo $Global['up_2domain'];
        ?>
/photo/<?php 
        echo $rows['path_s'];
        ?>
 alt="放大照片" border="0"></a></div></td>
  </tr>
  <tr>
  <td height="18" align="center" class=tiaose><?php 
        echo $rows['title'];
        ?>
</td>
  </tr>
  <tr>
  <td height="9" align="center" ><font color="#999999"><?php 
        echo date_format2($rows['addtime'], '%Y-%m-%d %H:%M');
        ?>
</font></td>
  </tr>
    
  </table></td>
  <?php 
        if ($j % 4 == 0) {
            ?>
  </tr>
  <tr>
  <?php 
        }
        ?>
  <?php 
    }
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:photo.php

示例4: date_format2

    case 4:
        echo "我们订婚了";
        break;
    case 5:
        echo "我们结婚了";
        break;
}
?>
</td>
</tr>
<tr>
  <td height="140" align="right" bgcolor="#FDF2F9" style="color:#FF6699;line-height:25px;padding-right:15px;font-family:Verdana">在这里 王子公主 童话每天上演 <br>
在这里 众里寻她 只需鼠标轻点 <br>
在这里 爱与被爱 缘来如此简单 <br>
<?php 
echo date_format2($addtime, '%Y年%m月%d日');
?>
 <br>
他们宣布:“<?php 
switch ($sussflag) {
    case 1:
        echo "我们约会了";
        break;
    case 2:
        echo "我们恋爱了";
        break;
    case 3:
        echo "我们热恋了";
        break;
    case 4:
        echo "我们订婚了";
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:detail.php

示例5: explode

        $tmpnickname = explode("|", $rows['nicknamesexgradephoto_s']);
        $tmpgrade = $tmpnickname[1] . $tmpnickname[2];
        geticon($tmpgrade);
        echo "<a href=" . $Global['home_2domain'] . "/" . $rows['userid'] . " target=_blank>" . $tmpnickname[0] . "</a>";
        ?>
</td>
<td width="99" align="center"><font color="#FF0000"><b><?php 
        echo $rows['bbsnum'];
        ?>
</b></font> <font color="#999999">/</font> <font color="#FF0000"> <?php 
        echo $rows['click'];
        ?>
</font></td>
<td width="219">
<?php 
        echo " <font color=#666666>" . date_format2($rows['endtime'], '%Y-%m-%d %H:%M') . "</font> <font color=#cccccc>|</font> ";
        $tmpnicknameend = explode("|", $rows['endnicknamesexgradephoto_s']);
        $tmpgradeend = $tmpnicknameend[1] . $tmpnicknameend[2];
        geticon($tmpgradeend);
        echo "<a href=" . $Global['home_2domain'] . "/" . $rows['userid'] . " target=_blank>" . $tmpnicknameend[0] . "</a>";
        ?>
</td>
</tr>
</table></td>
</tr>
</table>
<?php 
    }
} else {
    ?>
<table width="980" height="81" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bkbg.gif">
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:groupmain.php

示例6: htmlout

        ?>
			<div class="dataline">
				<div class="dataline1"><img src="images/dating.gif" align="absmiddle" /><a href="dating<?php 
        echo $rows['id'] . '.html';
        ?>
" target="_blank"><?php 
        echo htmlout(stripslashes($rows['title']));
        ?>
</a> <?php 
        if ($rows['ifjh'] == 1) {
            echo "<img src=images/jh.gif>";
        }
        ?>
</div>
				<div class="dataline2"><?php 
        echo date_format2($rows['yhtime'], '%Y-%m-%d %H:%M') . ' ' . getweek(date_format2($rows['yhtime'], '%Y-%m-%d'));
        ?>
<br />
<?php 
        $d1 = strtotime(date("Y-m-d H:i:s"));
        $d2 = $rows['yhtime'];
        $totals = $d2 - $d1;
        $day = intval($totals / 86400);
        $hour = intval($totals % 86400 / 3600);
        $hourmod = $totals % 86400 / 3600 - $hour;
        $minute = intval($hourmod * 60);
        if ($rows['flag'] == 2) {
            $totals = -1;
        }
        if ($totals > 0) {
            if ($day > 0) {
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:mydating.php

示例7: date_format2

        <option value="4" <?php 
if ($rows['price'] == 4) {
    echo "selected";
}
?>
>500Ԫ����</option>
      </select>
    </span></td>
  </tr>
  <tr>
  <?php 
$year8 = date_format2($rows['yhtime'], '%Y');
$month8 = date_format2($rows['yhtime'], '%m');
$day8 = date_format2($rows['yhtime'], '%d');
$hour8 = date_format2($rows['yhtime'], '%H');
$minute8 = date_format2($rows['yhtime'], '%M');
?>
    <td align="right"><span class="dt2">Լ��ʱ��:</span></td>
    <td align="left"><font color="#666666">
      <input name="year8" type="text" class="input" id="year8" style="width:40px;" onkeypress="if (event.keyCode &lt; 45 || event.keyCode &gt; 57) event.returnValue = false;" value="<?php 
echo $year8;
?>
" size="4" maxlength="4" />
��
<input name="month8" type="text" class="input" id="month8" style="width:20px;" onkeypress="if (event.keyCode &lt; 45 || event.keyCode &gt; 57) event.returnValue = false;" value="<?php 
echo $month8;
?>
" size="2" maxlength="2" />
��
<input name="day8" type="text" class="input" id="day8" style="width:20px;" onkeypress="if (event.keyCode &lt; 45 || event.keyCode &gt; 57) event.returnValue = false;" value="<?php 
echo $day8;
开发者ID:dalinhuang,项目名称:YZLOVE,代码行数:31,代码来源:dating_mod.php

示例8: badstr

                ?>
"  target=_blank><?php 
                if ($sex == 1) {
                    echo "<font color=#0066CC>";
                } else {
                    echo "<font color=#FB2E7B>";
                }
                echo badstr($sendnickname);
                ?>
</font></a>
<?php 
            }
            ?>
<br /></td>
<td width="450" align="left" style="line-height:200%;color:#999999;font-family:Verdana"><?php 
            echo date_format2($addtime, '%Y-%m-%d %H:%M');
            ?>
:<a href="b_gbook.php?aid=<?php 
            echo $id;
            ?>
&submitok=show&sg=<?php 
            echo $sex . $grade;
            ?>
&g=<?php 
            echo $grade;
            ?>
"><?php 
            if ($senduserid == $Global['m_gbookadminuid']) {
                echo "<font color=red>";
            }
            echo badcontact(htmlout(stripslashes($title)));
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:b_gbook.php

示例9: header

    exit;
}
if (!ereg("^[0-9]{1,9}\$", $cook_userid) || empty($cook_userid)) {
    echo 'Forbidden';
    exit;
}
require_once wrzc_net . 'sub/conn.php';
header("content-type:text/html;charset=gb2312");
$rt = $db->query("SELECT id,userid,senduserid,content,addtime,ifme,ifhe FROM " . __TBL_CHATMAIN__ . " WHERE (senduserid=" . $cook_userid . " AND userid=" . $uid_to . ")  OR  (userid=" . $cook_userid . " AND senduserid=" . $uid_to . ") ");
if ($db->num_rows($rt)) {
    $row = $db->fetch_array($rt);
    $classid = $row['id'];
    $userid = $row['userid'];
    $senduserid = $row['senduserid'];
    $content = "<div style='font-size:13px;color:#333333;padding:0px 15px 0px 15px'>" . stripslashes($row['content']) . "</div>";
    $addtime = date_format2($row['addtime'], '%H:%M:%S');
    $ifme = $row['ifme'];
    $ifhe = $row['ifhe'];
    if ($senduserid == $cook_userid && $userid == $uid_to && $ifme == 0) {
        $nickname = $cook_nickname;
        $sex = $cook_sex;
        if ($sex == 1) {
            $tmpnicknamecolor = '#0066CC';
        } else {
            $tmpnicknamecolor = '#FF6C96';
        }
        echo "<font color={$tmpnicknamecolor}>" . $nickname . " " . $addtime . "</font>" . $content;
        $db->query("UPDATE " . __TBL_CHATMAIN__ . " SET ifme=1 WHERE id=" . $classid);
    } elseif ($senduserid == $uid_to && $userid == $cook_userid && $ifhe == 0) {
        $nickname = $nickname_to;
        $sex = $sex_to;
开发者ID:JokeLook,项目名称:cmlove,代码行数:31,代码来源:mess.php

示例10: badstr

            break;
        }
        $id = $rows['id'];
        $sex = $rows['sex'];
        $title = badstr($rows['title']);
        $title = gylsubstr($title, 40);
        if ($t == 4 && !empty($k)) {
            $title = str_replace($k, "<span class=red>" . $k . "</span>", stripslashes($title));
        }
        $userid = $rows['userid'];
        $click = $rows['click'];
        $hfnum = $rows['hfnum'];
        $ifjh = $rows['ifjh'];
        $grade = $rows['grade'];
        $stime = $rows['stime'];
        $stime = date_format2($stime, '%m月%d日 %H:%M') . ' ' . getweek(date_format2($stime, '%Y-%m-%d'));
        $title = "<a href=" . $Global['home_2domain'] . "/diary{$id}.html target=_blank>" . $title . '</a>';
        $nickname = "<a href=" . $Global['home_2domain'] . "/{$userid} target=_blank>" . badstr($rows['nickname']) . "</a>";
        if ($ifjh == 1) {
            $title = $title . " <img src=images/j.gif align=absmiddle title=精品日记 />";
        }
        ?>
		<div class="ul">
			<div class="li1"><img src="images/pen.gif" /></div>
			<div class="li2"><?php 
        echo $title;
        ?>
</div>
			<div class="li3"><?php 
        geticon($sex . $grade);
        echo $nickname;
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:index.php

示例11: date_format2

    case 10:
        echo "郁闷";
        break;
    case 11:
        echo "沮丧";
        break;
    case 12:
        echo "一般";
        break;
}
?>
</font> 日期:<font class=tiaose><?php 
echo date_format2($stime, '%Y-%m-%d');
?>
 <?php 
echo getweek(date_format2($stime, '%Y-%m-%d'));
?>
</font> 已被阅读 <font color="#FF0000"><?php 
echo $diaryclick;
?>
</font> 次 评论 <font color="#FF0000"><?php 
echo $hfnum;
?>
</font> 条  <a href="<?php 
echo $Global['www_2domain'] . '/315.php';
?>
" class="ub666"><img src="images/jubao.gif" hspace="5" align="absmiddle" />举报此文</a></div>
	<div class="diaryContent"><?php 
echo $content;
?>
</div>
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:diary.php

示例12: date_format2

            break;
        }
        if ($i % 6 == 0) {
            $tmpmargin = ' marginR0';
        } else {
            $tmpmargin = '';
        }
        $nickname = $rows[0];
        $grade = $rows[1];
        $sex = $rows[2];
        $id = $rows[3];
        $userid = $rows[4];
        $path_s = $rows[5];
        $title = $rows[6];
        $addtime = $rows[7];
        $addtime = date_format2($addtime, '%m月%d日 %H:%M');
        $click = $rows[8];
        $ifjh = $rows[9];
        $nickname = badstr($nickname);
        $href = $Global['home_2domain'] . "/v{$id}.html";
        $title = badstr(stripslashes($rows[6]));
        $title = htmlout($title);
        $title = gylsubstr($title, 16);
        $ifjh = $ifjh == 1 ? "<img src=images/j.gif align=absmiddle title=推荐视频 /> " : '';
        if ($t == 5 && !empty($k)) {
            $nickname = str_replace($k, "<span class=red>" . $k . "</span>", $nickname);
        }
        $path_s = '<img src=' . $Global['up_2domain'] . '/' . $Global['m_flvpath'] . '/' . $path_s . '>';
        ?>
	<div class="Vbox<?php 
        echo $tmpmargin;
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:index.php

示例13: htmlout

            break;
        case 6:
            echo "其他";
            break;
        default:
            echo "不限";
            break;
    }
    ?>
</span></div>
			<div class="datingList">约会主题:<span class=tiaose><?php 
    echo htmlout(stripslashes($row['title']));
    ?>
</span></div>
			<div class="datingList">约会时间:<span class=tiaose><?php 
    echo date_format2($row['yhtime'], '%Y年%m月%d日 %H时 %M分') . ' ' . getweek(date_format2($row['yhtime'], '%Y-%m-%d'));
    ?>
</span></div>
			<div class="datingList">约会城市:<span class=tiaose><?php 
    echo $row['area1'] . ' >> ' . $row['area2'];
    ?>
</span></div>
			<div class="datingList">费用预算:<span class=tiaose><?php 
    switch ($row['price']) {
        case 1:
            echo "100元以下";
            break;
        case 2:
            echo "100~300元";
            break;
        case 3:
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:main.php

示例14: stripslashes

<?php

require_once 'pubT.php';
$rt = $db->query("SELECT id,title,addtime FROM " . __TBL_NEWS__ . " WHERE kind=1 ORDER BY id DESC LIMIT 8");
if (!$db->num_rows($rt)) {
    echo '<h6>ÔÝÎÞÐÅÏ¢</h6>';
} else {
    $total = $db->num_rows($rt);
    for ($i = 1; $i <= $total; $i++) {
        $rows = $db->fetch_array($rt);
        if (!$rows) {
            break;
        }
        ?>
<div class="li1"><img src="images/lid.gif" /> <a href=<?php 
        echo 'news' . $rows[0] . '.html';
        ?>
 target=_blank><?php 
        echo stripslashes($rows[1]);
        ?>
</a></div>
<div class="li2"><?php 
        echo date_format2($rows[2], '%Y-%m-%d');
        ?>
</div>
<?php 
    }
}
require_once 'pubB.php';
开发者ID:JokeLook,项目名称:cmlove,代码行数:29,代码来源:pp4.php

示例15: stripslashes

?>
<table width="980" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="bottom" style="font-size:18px;font-family:黑体,宋体;color:#000"><?php 
echo stripslashes($row['title']);
?>
</td>
  </tr>
</table>
<table width="950" height="40" border="00" align="center" cellpadding="0" cellspacing="0" style="border-bottom:#efefef 1px solid">
  <tr>
    <td align="center" style="font-family:Verdana;color:#777">浏览:<font color="#FF0000"><?php 
echo $row['click'];
?>
</font>次  发布时间:<?php 
echo date_format2($row['addtime'], '%Y年%m月%d日');
?>
</td>
  </tr>
</table><br>
<table width="950" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="dddddd" style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all;">
  <tr>
    <td align="left" valign="top" bgcolor="#FFFFFF" style="font-size:10.3pt;line-height:200%;COLOR:#000000"><?php 
echo stripslashes($row['content']);
?>
</td>
  </tr>
</table>
<table width="950" height="40" border="00" align="center" cellpadding="0" cellspacing="0" style="border-bottom:#efefef 1px solid">
  <tr>
    <td align="center">&nbsp;</td>
开发者ID:norain2050,项目名称:cmlove,代码行数:31,代码来源:newsshow.php


注:本文中的date_format2函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。