<tfoot id='baYvK'></tfoot>

    1. <small id='baYvK'></small><noframes id='baYvK'>

        <legend id='baYvK'><style id='baYvK'><dir id='baYvK'><q id='baYvK'></q></dir></style></legend>
          <bdo id='baYvK'></bdo><ul id='baYvK'></ul>
      1. <i id='baYvK'><tr id='baYvK'><dt id='baYvK'><q id='baYvK'><span id='baYvK'><b id='baYvK'><form id='baYvK'><ins id='baYvK'></ins><ul id='baYvK'></ul><sub id='baYvK'></sub></form><legend id='baYvK'></legend><bdo id='baYvK'><pre id='baYvK'><center id='baYvK'></center></pre></bdo></b><th id='baYvK'></th></span></q></dt></tr></i><div id='baYvK'><tfoot id='baYvK'></tfoot><dl id='baYvK'><fieldset id='baYvK'></fieldset></dl></div>

      2. PHP时间戳到HTML 5输入类型=日期时间元素

        PHP timestamp to HTML 5 input type=datetime element(PHP时间戳到HTML 5输入类型=日期时间元素)
      3. <tfoot id='OcWRw'></tfoot>

          • <small id='OcWRw'></small><noframes id='OcWRw'>

            • <bdo id='OcWRw'></bdo><ul id='OcWRw'></ul>
                  <tbody id='OcWRw'></tbody>
                  <i id='OcWRw'><tr id='OcWRw'><dt id='OcWRw'><q id='OcWRw'><span id='OcWRw'><b id='OcWRw'><form id='OcWRw'><ins id='OcWRw'></ins><ul id='OcWRw'></ul><sub id='OcWRw'></sub></form><legend id='OcWRw'></legend><bdo id='OcWRw'><pre id='OcWRw'><center id='OcWRw'></center></pre></bdo></b><th id='OcWRw'></th></span></q></dt></tr></i><div id='OcWRw'><tfoot id='OcWRw'></tfoot><dl id='OcWRw'><fieldset id='OcWRw'></fieldset></dl></div>

                  <legend id='OcWRw'><style id='OcWRw'><dir id='OcWRw'><q id='OcWRw'></q></dir></style></legend>
                  本文介绍了PHP时间戳到HTML 5输入类型=日期时间元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 PHP 中有一个 unix 时间戳 (int).我想在 HTML5 日期时间输入元素中以一种很好的方式显示这个值.我希望能够让用户以一种漂亮的方式看到这个值,并对其进行编辑.有什么好的方法可以做到这一点,还是我在自欺欺人,我将不得不对大量的字符串操作大惊小怪?

                  I have a unix timestamp (int) in PHP. I want to display this value in a nice manner in the HTML5 datetime input element. I would like to be able to have users see this value in a nice presentable manner, as well as edit it. Is there any nice way of doing this, or am I fooling myself and I am going to have to fuss around with lots of string manipulation?

                  推荐答案

                  HTML5 Input time 是这样的:1985-04-12T23:20:50.52

                  你可以像这样在 PHP 中做到这一点:

                  You can do that in PHP like this :

                  echo date("Y-m-dTH:i:s");
                  

                  输出

                  2012-10-02T19:12:49
                  

                  带有时间戳的 HTML

                  HTML with Timestamp

                  <input type="datetime"  value="<?php echo date("Y-m-dTH:i:s",$timestamp); ?>"/>
                  

                  这篇关于PHP时间戳到HTML 5输入类型=日期时间元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                  datetime to timestamp(日期时间到时间戳)
                  PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                  Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                  Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                  Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)

                          <bdo id='wnfFI'></bdo><ul id='wnfFI'></ul>
                            <tbody id='wnfFI'></tbody>
                          <tfoot id='wnfFI'></tfoot>
                            <legend id='wnfFI'><style id='wnfFI'><dir id='wnfFI'><q id='wnfFI'></q></dir></style></legend>
                          • <small id='wnfFI'></small><noframes id='wnfFI'>

                            <i id='wnfFI'><tr id='wnfFI'><dt id='wnfFI'><q id='wnfFI'><span id='wnfFI'><b id='wnfFI'><form id='wnfFI'><ins id='wnfFI'></ins><ul id='wnfFI'></ul><sub id='wnfFI'></sub></form><legend id='wnfFI'></legend><bdo id='wnfFI'><pre id='wnfFI'><center id='wnfFI'></center></pre></bdo></b><th id='wnfFI'></th></span></q></dt></tr></i><div id='wnfFI'><tfoot id='wnfFI'></tfoot><dl id='wnfFI'><fieldset id='wnfFI'></fieldset></dl></div>