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


PHP Time::unixToDate方法代码示例

本文整理汇总了PHP中Time::unixToDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::unixToDate方法的具体用法?PHP Time::unixToDate怎么用?PHP Time::unixToDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Time的用法示例。


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

示例1: print_r

<?php

require_once '../general.php';
$stocks = Stock::all()->as_array();
print_r($stocks);
echo time() . "\n";
echo Time::unixToDate(time()) . "\n";
echo date(DATE_RFC822, strtotime('thursday next week 10:30am', 1352710199)) . "\n";
echo date(DATE_RFC822, strtotime('next month', 1352710199)) . "\n";
开发者ID:samdubey,项目名称:ads2,代码行数:9,代码来源:stock_test.php

示例2:

<?php

require_once "../general.php";
$t = Time::dateToUnix('12/07/1986');
echo $t . "\n";
echo Time::unixToDate(1350988194976 / 1000);
开发者ID:samdubey,项目名称:ads2,代码行数:6,代码来源:time_test.php

示例3: getBirthday

 public function getBirthday()
 {
     return Time::unixToDate($this->_orm->birthday);
 }
开发者ID:samdubey,项目名称:ads2,代码行数:4,代码来源:profile.php

示例4: user_order_receipt

 public static function user_order_receipt()
 {
     return function ($request, $response) {
         $user_id = $request->session('id');
         if ($user_id) {
             $response->header('Content-Type', 'application/pdf');
             $id = $request->id;
             $order = Order::findById($id);
             $report = Zend_Pdf::load('../pdf/trustrec.pdf');
             $page = $report->pages[0];
             $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_TIMES);
             $page->setFont($font, 11);
             $page->drawText(Time::unixToDate(time()), 460, 900);
             $page->drawText(Time::unixToDate(time()), 460, 455);
             $page->drawText('Order#: ' . $order->id, 400, 910);
             $page->drawText('Order#: ' . $order->id, 400, 465);
             $page->drawText($order->user->profile->fullname, 100, 900);
             $page->drawText($order->user->profile->fullname, 100, 455);
             $page->drawText($order->user->profile->address, 440, 530);
             $page->drawText($order->user->profile->address, 440, 85);
             $page->drawText($order->user->profile->fullname, 445, 555);
             $page->drawText($order->user->profile->fullname, 445, 109);
             $row = 850;
             foreach ($order->items as $item) {
                 # code...
                 $page->drawText($item->product->name, 80, $row);
                 $page->drawText($item->product->name, 80, $row - 446);
                 $page->drawText($item->quantity, 45, $row);
                 $page->drawText($item->quantity, 45, $row - 446);
                 $page->drawText(money_format('%5.2n', $item->product->price), 315, $row);
                 $page->drawText(money_format('Php %5.2n', $item->subtotal), 370, $row);
                 $page->drawText(money_format('%5.2n', $item->product->price), 315, $row - 446);
                 $page->drawText(money_format('Php %5.2n', $item->subtotal), 370, $row - 446);
                 $row -= 17;
             }
             $page->drawText(money_format('Php %5.2n', $order->total), 370, 562);
             $page->drawText(money_format('Php %5.2n', $order->total), 370, 118);
             #$page->drawText( money_format('Php %5.2n', $order->total * 0.30),450,485);
             echo $report->render();
         } else {
             $response->code(403);
         }
     };
 }
开发者ID:samdubey,项目名称:ads2,代码行数:44,代码来源:reportctrl.php

示例5: dirname

<?php

require_once "../db/general.php";
$path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'lib';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once "Zend/Pdf.php";
//$response->header('Content-Type','application/pdf');
$stocks_report = Zend_Pdf::load('../pdf/inv.pdf');
$page = $stocks_report->pages[0];
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_TIMES);
$page->setFont($font, 11);
//echo "Height = {$page->getHeight()} \n";
//echo "Width  = {$page->getWidth()} \n";
$page->drawText("as of " . Time::unixToDate(time()), 100, 100);
echo $stocks_report->save('test.pdf');
?>

开发者ID:samdubey,项目名称:ads2,代码行数:16,代码来源:pdf.php


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