관리-도구
편집 파일: 096.phpt
--TEST-- Module info test --SKIPIF-- <?php if(!extension_loaded("rar")) print "skip"; ?> --FILE-- <?php ob_start(); phpinfo(INFO_MODULES); $phpinfo = ob_get_contents(); ob_end_clean(); //normalize line endings $phpinfo = str_replace("\r\n", "\n", $phpinfo); $phpinfo = str_replace("\r", "\n", $phpinfo); $phpinfo = explode("\n", $phpinfo); $found = false; $empty = 0; foreach ($phpinfo as $line) { if (!$found) { if ($line == "rar") { $found = true; } } else { if (empty($line)) { $empty++; } elseif ($empty == 1) { echo $line."\n"; } } } echo "\n"; echo "Done.\n"; --EXPECTF-- RAR support => enabled RAR EXT version => %d.%d.%s UnRAR version => %d.%d%spatch%d %d-%d-%d UnRAR API version => %d extension %d Done.