【发布时间】:2015-04-09 22:10:37
【问题描述】:
我想列出 2 个目录中的文件,但收到以下错误:
参数 #1 不是第 62 行 C:\wamp\www\new.php 中的数组:
$directory = '/openssl/bin/';
$extension = '.pem';
$directory2 = '/openssl/try/bin/';
$extension2 = '*.*';
if ( file_exists($directory) ) {
foreach(glob($directory.'*'.$extension) as $file){
foreach(glob($directory2.'*'.$extension2) as $file2){
$result = array_merge($file, $file2); // line 76 error 1
?>
<tr >
我希望输出是 2 个目录中的文件名列表
<td> <?php echo basename($result); ?></td> // this should be list all the filename inside the 2 directory in table
file_get_contents(): C:\wamp\www\new.php 中第 76 行的文件名不能为空 第 76 行以下
$data = openssl_x509_parse(file_get_contents($result));
【问题讨论】:
-
您的预期输出是什么?
-
`
td> `我想列出两个目录中的文件名 -
不太确定你想要什么,也许试试这个:pastebin.com/ZZ0ydVQY
标签: php