©
本文档使用 PHP中文网手册 发布
(PHP 4, PHP 5)
readline_list_history — 获取命令历史列表
获取整个命令行历史.
返回整个命令行历史的数组.元素的整数索引从零开始
[#1] Anonymous [2011-01-26 18:17:53]
Note this function is only available when PHP is compiled with libreadline, not if it is compiled with libedit.
<?php
if (function_exists('readline_list_history')) {
$history = readline_list_history();
// ...
} else {
echo 'Not supported by the compiled library.'.PHP_EOL;
}
?>