我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用PHP将当前时间设置为静态变量?

I need to set the current date and time in static variable.

I need to insert the 50 records into database table. Here,I need to insert the current date and time. Then, I need to set the current date and time of the 50 records are same. I used this  date('Y-m-d H:i:s'); format. This format will change every minutes and seconds.

How to I do. Please help me.

  $date = date('Y-m-d H:i:s')

then use this variable,for create records. All records will have same time.

近期文章

  • 如何在jquery中的rate按钮下面显示消息状态?
  • 基于用户登录在阵列中执行添加的逻辑
  • 陷入错误:警告:mysql_fetch_array()期望参数1是资源,布尔[重复]
  • 命令行中的cURL标题显示content-type为image / png,在PHP中显示text / html?
  • Slim PUT请求空体
  • php的print(SELECT)语句
  • 发送Curl POSTFIELDS数组
  • 将$ FILE数据传递给$ .getJSON
  • PHP联系表格不起作用(3)
  • 清除搜索过滤器php上的链接
  • Plesk 12:从文档根目录外链接Php文件不起作用(纯html会)
  • 模拟全局静态方法的最佳方法
  • PHP PDO - 如何解决此问题?
  • 如何调用与变量结合的属性?
  • 将类别名称类添加到类别链接
  • 如何使str_ireplace同样的情况
  • 无限循环使用localhost而不是域
  • 使用数组作为函数参数php
  • Symfony,表单构建器实体类型,动态获取相关字段
  • Swift - 将图像保存到服务器并检索它的最佳方法

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华