diff --git a/reference/datetime/dateerror.xml b/reference/datetime/dateerror.xml
new file mode 100644
index 000000000..3969113ca
--- /dev/null
+++ b/reference/datetime/dateerror.xml
@@ -0,0 +1,82 @@
+
+
+
+ DateError 类
+ DateError
+
+
+
+
+
+ &reftitle.intro;
+
+ 当找不到时区数据库或数据库包含无效数据时抛出。
+
+
+ 此错误不应该出现,并且与代码无关。有两个子异常(DateObjectError
+ 和 DateRangeError),它们根据程序员错误或范围相关问题抛出。
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+
+ DateError
+
+
+
+ extends
+ Error
+
+
+ &InheritedProperties;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ DateObjectError
+ DateRangeError
+
+
+
+
+
+
diff --git a/reference/datetime/dateexception.xml b/reference/datetime/dateexception.xml
new file mode 100644
index 000000000..3d67e9ade
--- /dev/null
+++ b/reference/datetime/dateexception.xml
@@ -0,0 +1,81 @@
+
+
+
+ DateException 类
+ DateException
+
+
+
+
+
+ &reftitle.intro;
+
+ 日期/时间异常的父类,用于由用户输入或需要解析的自由格式文本参数引发的问题。
+
+
+ 该扩展会抛出以下子异常:
+
+ DateInvalidOperationException
+ DateInvalidTimezoneException
+ DateMalformedIntervalStringException
+ DateMalformedPeriodStringException
+ DateMalformedStringException
+
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+
+ DateException
+
+
+
+ extends
+ Exception
+
+
+ &InheritedProperties;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/datetime/datetime/settime.xml b/reference/datetime/datetime/settime.xml
index 913d5708c..6329c6b95 100644
--- a/reference/datetime/datetime/settime.xml
+++ b/reference/datetime/datetime/settime.xml
@@ -99,10 +99,8 @@
8.1.0
- The behaviour with double existing hours (during the fall-back
- DST transition) changed. Previously PHP would pick the second occurrence
- (after the DST transition), instead of the first occurrence (before DST
- transition).
+ 重复存在的小时(在夏令时回拨转换期间)的行为已更改。之前
+ PHP 会选择第二次出现的时间(夏令时转换之后),而不是第一次出现的时间(夏令时转换之前)。
7.1.0
diff --git a/reference/datetime/datetimeinterface.xml b/reference/datetime/datetimeinterface.xml
index af1366206..8326e8441 100644
--- a/reference/datetime/datetimeinterface.xml
+++ b/reference/datetime/datetimeinterface.xml
@@ -301,7 +301,7 @@
DATE_RFC3339
- 同 DATE_ATOM(自 PHP 5.1.3 版本可用)
+ 同 DATE_ATOM
@@ -340,7 +340,7 @@
DATE_W3C
- RSS 格式(示例:2005-08-15T15:52:01+00:00)
+ World Wide Web Consortium(示例:2005-08-15T15:52:01+00:00)
diff --git a/reference/filesystem/functions/move-uploaded-file.xml b/reference/filesystem/functions/move-uploaded-file.xml
index 58c36ebcd..7e1633c1e 100644
--- a/reference/filesystem/functions/move-uploaded-file.xml
+++ b/reference/filesystem/functions/move-uploaded-file.xml
@@ -70,7 +70,7 @@
&reftitle.examples;
- Uploading multiple files
+ 上传多个文件
+
+
+
+
+ openssl_sign
+ 生成签名
+
+
+
+ &reftitle.description;
+
+ boolopenssl_sign
+ stringdata
+ stringsignature
+ #[\SensitiveParameter]OpenSSLAsymmetricKeyOpenSSLCertificatearraystringprivate_key
+ stringintalgorithmOPENSSL_ALGO_SHA1
+ intpadding0
+
+
+ openssl_sign 使用与
+ private_key 关联的私钥为指定的
+ data 生成加密数字签名。注意数据本身并未被加密。
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ data
+
+
+ 要签名的数据字符串。
+
+
+
+
+ signature
+
+
+ 如果调用成功,签名将返回到 signature 中。
+
+
+
+
+ private_key
+
+
+ OpenSSLAsymmetricKey - 一个密钥,通过 openssl_get_privatekey 函数返回。
+
+
+ string - 一个 PEM 格式的密钥。
+
+
+
+
+ algorithm
+
+
+ int - 以下签名算法之一。
+
+
+ string - 由 openssl_get_md_methods 函数返回的有效字符串,例如 "sha256WithRSAEncryption" 或 "sha384"。
+
+
+
+
+ padding
+
+ RSA PSS 填充方案。
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 8.5.0
+
+ 添加了可选参数 padding。
+
+
+
+ 8.0.0
+
+ private_key 现在接受 OpenSSLAsymmetricKey
+ 或 OpenSSLCertificate 实例;之前接受类型 OpenSSL key 或
+ OpenSSL X.509 的 &resource;。
+
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+
+ openssl_sign 示例
+
+
+]]>
+
+
+
+ openssl_sign 示例
+
+ 2048,
+ "private_key_type" => OPENSSL_KEYTYPE_RSA,
+));
+openssl_pkey_export($new_key_pair, $private_key_pem);
+
+$details = openssl_pkey_get_details($new_key_pair);
+$public_key_pem = $details['key'];
+
+//create signature
+openssl_sign($data, $signature, $private_key_pem, OPENSSL_ALGO_SHA256);
+
+//save for later
+file_put_contents('private_key.pem', $private_key_pem);
+file_put_contents('public_key.pem', $public_key_pem);
+file_put_contents('signature.dat', $signature);
+
+//verify signature
+$r = openssl_verify($data, $signature, $public_key_pem, "sha256WithRSAEncryption");
+var_dump($r);
+?>
+]]>
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ openssl_verify
+
+
+
+
+
+
diff --git a/reference/session/functions/session-abort.xml b/reference/session/functions/session-abort.xml
new file mode 100644
index 000000000..d5e76b80b
--- /dev/null
+++ b/reference/session/functions/session-abort.xml
@@ -0,0 +1,93 @@
+
+
+
+
+ session_abort
+ 丢弃会话数组的更改并结束会话
+
+
+
+ &reftitle.description;
+
+ boolsession_abort
+
+
+
+ session_abort 在不保存数据的情况下结束会话。
+ 因此会话数据中的原始值会被保留。
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 7.2.0
+
+ 此函数的返回类型现在是 bool。
+ 之前是 void。
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ $_SESSION
+
+ session.auto_start
+ 配置指示
+
+ session_start
+ session_reset
+ session_commit
+
+
+
+
+
+
+
diff --git a/reference/session/functions/session-gc.xml b/reference/session/functions/session-gc.xml
new file mode 100644
index 000000000..3c49fe638
--- /dev/null
+++ b/reference/session/functions/session-gc.xml
@@ -0,0 +1,136 @@
+
+
+
+
+ session_gc
+ 执行会话数据垃圾回收
+
+
+ &reftitle.description;
+
+ intfalsesession_gc
+
+
+
+ 默认情况下,PHP 使用 session.gc_probability
+ 在每次请求时以概率方式运行会话垃圾回收器。这种方法存在一些局限性:
+
+
+ 低流量站点的会话数据可能无法在预期时间内被删除。
+ 高流量站点的垃圾回收器可能运行过于频繁,执行不必要的额外工作。
+ 垃圾回收在用户请求时执行,用户可能会感受到延迟。
+
+
+ 对于生产系统,建议通过将
+ session.gc_probability 设置为 0
+ 来禁用基于概率的垃圾回收,并定期显式触发垃圾回收器,例如在类 UNIX 系统上使用
+ "cron" 运行调用 session_gc 的脚本。
+
+
+
+
+ 从命令行 PHP 脚本调用 session_gc 时,
+ session.save_path 必须设置为与
+ Web 请求相同的值,并且脚本必须对会话文件具有访问和删除权限。这可能受到脚本运行用户的影响,
+ 以及容器或沙箱功能(如 systemd 的 PrivateTmp= 选项)的影响。
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ session_gc 成功时返回删除的会话条目数,&return.falseforfailure;。
+
+
+
+ 旧的会话保存处理程序不返回删除的会话条目数,而只返回成功/失败标志。在这种情况下,
+ 无论实际删除了多少会话条目,都会返回 1。
+
+
+
+
+
+ &reftitle.examples;
+
+ 用于 cron 等任务管理器的 session_gc 示例
+
+
+]]>
+
+
+
+ 用于用户可访问脚本的 session_gc 示例
+
+
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+ session_start
+ session_destroy
+ session.gc_probability
+
+
+
+
diff --git a/reference/session/functions/session-regenerate-id.xml b/reference/session/functions/session-regenerate-id.xml
index 0649b5fb5..cafa36190 100644
--- a/reference/session/functions/session-regenerate-id.xml
+++ b/reference/session/functions/session-regenerate-id.xml
@@ -71,7 +71,7 @@
&reftitle.examples;
- A session_regenerate_id 示例
+ session_regenerate_id 示例
- Avoiding lost session by session_regenerate_id
+ 通过 session_regenerate_id 避免会话丢失
+
+
+
+
+ session_reset
+ 使用会话存储中的原始值重新初始化会话数组
+
+
+
+ &reftitle.description;
+
+ boolsession_reset
+
+
+
+ session_reset 使用会话存储中保存的原始值重新初始化会话。
+ 此函数需要一个活跃的会话,并且会丢弃 $_SESSION 中的所有更改。
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 7.2.0
+
+ 此函数的返回类型现在是 bool。
+ 之前返回类型是 void。
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ $_SESSION
+
+ session.auto_start
+ 配置指示
+
+ session_start
+ session_abort
+ session_commit
+
+
+
+
+
+
+