文字

readline_list_history

(PHP 4, PHP 5)

readline_list_history获取命令历史列表

说明

array readline_list_history ( void )

获取整个命令行历史.

返回值

返回整个命令行历史的数组.元素的整数索引从零开始

用户评论:

[#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;
}
?>

上一篇: 下一篇: