无需言 做自己 业 ,精于勤 荒于嬉.
- Date/Time 函数 date_create_from_format 别名 DateTime::createFromFormat()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_create_from_format
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_create_from_format — 别名 DateTime::createFromFormat()
说明
此函数是该函数的别名: DateTime::createFromFormat()
- Date/Time 函数 date_default_timezone_set 设定用于一个脚本中所有日期时间函数的默认时区
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
示例1
<?php date_default_timezone_set('America/Los_Angeles'); $script_tz = date_default_timezone_get(); if (strcmp($script_tz, ini_get('date.timezone'))){ echo 'Script timezone differs from ini-set timezone.'; } else { echo 'Script timezone and ini-set timezone match.'; } ?>
- Date/Time 函数 date_default_timezone_get 取得一个脚本中所有日期时间函数所使用的默认时区
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
示例1
<?php date_default_timezone_set('Europe/London'); if (date_default_timezone_get()) { echo 'date_default_timezone_set: ' . date_default_timezone_get() . '<br />'; } if (ini_get('date.timezone')) { echo 'date.timezone: ' . ini_get('date.timezone'); } ?>示例2
<?php date_default_timezone_set('America/Los_Angeles'); echo date_default_timezone_get() . ' => ' . date('e') . ' => ' . date('T'); ?>
- Date/Time 函数 date_date_set 别名 DateTime::setDate()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_date_set
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
date_date_set — 别名 DateTime::setDate()
说明
此函数是该函数的别名: DateTime::setDate()
- Date/Time 函数 date_diff 别名 DateTime::diff()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_diff
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_diff — 别名 DateTime::diff()
说明
此函数是该函数的别名: DateTime::diff()
- Date/Time 函数 date_create 别名 DateTime::__construct()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_create
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
date_create — 别名 DateTime::__construct()
说明
此函数是该函数的别名: DateTime::__construct()
- Date/Time 函数 date_interval_create_from_date_string 别名 DateInterval::createFromDateString()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_interval_create_from_date_string
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_interval_create_from_date_string — 别名 DateInterval::createFromDateString()
说明
此函数是该函数的别名: DateInterval::createFromDateString()
- Date/Time 函数 date_modify 别名 DateTime::modify()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_modify
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
date_modify — 别名 DateTime::modify()
说明
此函数是该函数的别名: DateTime::modify()
- Date/Time 函数 date_get_last_errors 别名 DateTime::getLastErrors()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_get_last_errors
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_get_last_errors — 别名 DateTime::getLastErrors()
说明
此函数是该函数的别名: DateTime::getLastErrors()
- Date/Time 函数 date_format 别名 DateTime::format()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_format
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
date_format — 别名 DateTime::format()
说明
此函数是该函数的别名: DateTime::format()
- Date/Time 函数 date_offset_get 别名 DateTime::getOffset()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_offset_get
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
date_offset_get — 别名 DateTime::getOffset()
说明
此函数是该函数的别名: DateTime::getOffset()
- Date/Time 函数 date_parse 返回指定日期/时间的详细信息的关联数组
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
示例1
<?php print_r(date_parse("2006-12-12 10:00:00.5")); ?>示例2
<?php print_r(date_parse("2006-12-12 10:00:00.5 +1 week +1 hour")); ?>
- Date/Time 函数 date_interval_format 别名 DateInterval::format()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_interval_format
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_interval_format — 别名 DateInterval::format()
说明
此函数是该函数的别名: DateInterval::format()
- Date/Time 函数 date_sub 别名 DateTime::sub()
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
date_sub
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
date_sub — 别名 DateTime::sub()
说明
此函数是该函数的别名: DateTime::sub()
- Date/Time 函数 date_parse_from_format Get info about given date formatted according to the specified format
-
发表日期:2021-07-01 08:55:26 | 来源: | 分类:Date/Time 函数
-
示例1
<?php $date = "6.1.2009 13:00+01:00"; print_r(date_parse_from_format("j.n.Y H:iP", $date)); ?>
- Date/Time 函数 date_create_immutable 别名 DateTimeImmutable::__construct()
-
发表日期:2021-07-01 08:55:25 | 来源: | 分类:Date/Time 函数
-
date_create_immutable
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
date_create_immutable — 别名 DateTimeImmutable::__construct()
说明
此函数是该函数的别名: DateTimeImmutable::__construct()
- Date/Time 函数 checkdate 验证一个格里高里日期
-
发表日期:2021-07-01 08:55:25 | 来源: | 分类:Date/Time 函数
-
示例1
<?php var_dump(checkdate(12, 31, 2000)); var_dump(checkdate(2, 29, 2001)); ?>
- Date/Time 函数 date_create_immutable_from_format 别名 DateTimeImmutable::createFromFormat()
-
发表日期:2021-07-01 08:55:25 | 来源: | 分类:Date/Time 函数
-
date_create_immutable_from_format
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
date_create_immutable_from_format — 别名 DateTimeImmutable::createFromFormat()
说明
此函数是该函数的别名: DateTimeImmutable::createFromFormat()
- OpenSSL 函数 openssl_x509_export_to_file 导出证书至文件
-
发表日期:2021-07-01 08:55:24 | 来源: | 分类:OpenSSL 函数
-
openssl_x509_export_to_file
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
openssl_x509_export_to_file — 导出证书至文件
说明
openssl_x509_export_to_file(mixed$x509, string$outfilename, bool$notext=true): boolopenssl_x509_export_to_file() 将
x509以PEM编码的格式保存到名为outfilename的文件中。参数
-
x509 -
参见密钥/证书参数以获取有效值列表。
-
outfilename -
输出文件的路径。
-
notext -
可选参数
notext影响输出的冗余度。如果设为false,输出内容将包含附加的人类可读信息。notext的缺省值为true。
返回值
成功时返回
true, 或者在失败时返回false。 -
- OpenSSL 函数 openssl_verify 验证签名
-
发表日期:2021-07-01 08:55:24 | 来源: | 分类:OpenSSL 函数
-
示例1
<?php // $data and $signature are assumed to contain the data and the signature// fetch public key from certificate and ready it$pubkeyid = openssl_pkey_get_public("file://src/openssl-0.9.6/demos/sign/cert.pem"); // state whether signature is okay or not$ok = openssl_verify($data, $signature, $pubkeyid); if ($ok == 1) { echo "good"; } elseif ($ok == 0) { echo "bad"; } else { echo "ugly, error checking signature"; } // free the key from memoryopenssl_free_key($pubkeyid); ?>示例2
<?php //data you want to sign$data = 'my data'; //create new private and public key$private_key_res = openssl_pkey_new(array( "private_key_bits" => 2048, "private_key_type" => OPENSSL_KEYTYPE_RSA,)); $details = openssl_pkey_get_details($private_key_res); $public_key_res = openssl_pkey_get_public($details['key']); //create signatureopenssl_sign($data, $signature, $private_key_res, "sha1WithRSAEncryption"); //verify signature$ok = openssl_verify($data, $signature, $public_key_res, OPENSSL_ALGO_SHA1); if ($ok == 1) { echo "valid"; } elseif ($ok == 0) { echo "invalid"; } else { echo "error: ".openssl_error_string(); } ?>
- 前端开发(1)
- 数据库(0)
- PHP(0)
- PHP杂项(34)
- PHP基础-李炎恢系列课程(20)
- 中文函数手册(0)
- 错误处理 函数(13)
- OPcache 函数(6)
- PHP 选项/信息 函数(54)
- Zip 函数(10)
- Hash 函数(15)
- OpenSSL 函数(63)
- Date/Time 函数(51)
- 目录函数(9)
- Fileinfo 函数(6)
- iconv 函数(11)
- 文件系统函数(81)
- 多字节字符串 函数(57)
- GD 和图像处理 函数(114)
- 可交换图像信息(5)
- Math 函数(50)
- 程序执行函数(11)
- PCNTL 函数(23)
- JSON 函数(4)
- SPL 函数(15)
- URL 函数(10)
- cURL 函数(32)
- 网络 函数(33)
- FTP 函数(36)
- Session 函数(23)
- PCRE 函数(11)
- PCRE 正则语法(19)
- 数组 函数(81)
- 类/对象 函数(18)
- 函数处理 函数(13)
- 变量处理 函数(37)
- SimpleXML 函数(3)
- 杂项 函数(31)
- 字符串 函数(101)
- JAVA(0)
- Android(0)
- Linux(0)
- AI大模型(9)
- 其他(0)
宁公网安备 64010402001209号