php strtotime 常用要点
发表于|更新于|php
strtotime 是个常用的函数
一般是获取当前时间
手册中是他的语义化的用法
1 | strtotime("+2 day" ,time()) |
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2019-09-05
PHP 获取 对象唯一id spl_object_hash
1234567// 对象spl_object_hash测试$object = new stdClass;$id = spl_object_hash($object);var_dump($id); // 00000000408de7e4000000006ad86d42$object->id = 1;$id = spl_object_hash($object);var_dump($id); // 00000000408de7e4000000006ad86d42 注意When an object is destroyed, its hash may be reused for other objects.当对象被销毁时候,这个哈希id可能被其他对象重用
2015-09-10
mysql_fetch_object
mysql_fetch_object() 函数从结果集(记录集)中取一行作为对象。使用 -> 取出数据
2017-09-02
php apache 配置 https ssl phpstudy 开启 Forward Secrecy 前向保密
SSL HTTPS检测获得A+的方法 检测地址 https://www.ssllabs.com/ssltest/ apache版本 2.4 开启php的openssl模块 开启apache的ssl模块 一般大家是用apache虚拟机的增加如下配置 1234567891011121314151617181920212223242526272829Listen 443<VirtualHost *:443> DocumentRoot "C:\php\www" ServerName iguojin.com ServerAlias # 开启HSTS长期有效 Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" # 开启SSL SSLEngine on # 添加SSL协议支持协议 SSLProtocol all -SSLv2 -SSLv3 # 服务器...
2018-02-11
PHP 开启报错
123ini_set("display_errors", "On");error_reporting(E_ALL | E_STRICT);
2019-06-02
PHP 常用算法
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153/** * 二分查找(数组里查找某个元素) * @param array $array * @param int $low 最小索引 * @param int $high 最大索引 * @param mixed $search 待查找元素 * @return mix...
2018-07-11
php 使用 compser 安装一个自己的类库
安装方法很多,给出fork别人的类 开源代码在自己的根目录composer.json中增加两个东西 别人类库中的composer.json中的name是包名,加到require字段 增加一个repositories字段,写法如下实例 执行composer update即可安装完毕 123456"repositories": [ { "type": "vcs", "url": "https://github.com/1291061979/php_sdk" }]
公告
This is my Blog