<?php
$dir_path = 'kusal/test'; //directory path
$list_files = scandir($dir_path);
//dumping the array
//hope you know how to access an array
echo '<pre>'; //html <pre> tags will format the output
print_r($list_files);
echo '</pre>';
/*
Output look like this
Array
(
[0] => .
[1] => ..
[2] => TextDocument.txt
[3] => kuppiya.doc
[4] => lion.ppt
[5] => test.as
)
*/
?>
Get Free Sinhala IT Learning Videos Kuppiya.com
No comments:
Post a Comment