get list of all file in php project
Sacndir functions are used to get list of file in php project
<?php
$dir = 'application';
$files1 = scandir($dir);
print_r($files1);
?>
The above example give the following output
Array
(
[0] => .
[1] => ..
[2] => cache
[3] => config
[4] => controllers
[5] => core
[6] => errors
[7] => helpers
[8] => hooks
[9] => index.html
[10] => language
[11] => libraries
[12] => migrations
[13] => models
[14] => third_party
[15] => views
)
Sacndir functions are used to get list of file in php project
<?php
$dir = 'application';
$files1 = scandir($dir);
print_r($files1);
?>
The above example give the following output
Array
(
[0] => .
[1] => ..
[2] => cache
[3] => config
[4] => controllers
[5] => core
[6] => errors
[7] => helpers
[8] => hooks
[9] => index.html
[10] => language
[11] => libraries
[12] => migrations
[13] => models
[14] => third_party
[15] => views
)
No comments:
Post a Comment