What is glob in PHP Filesystem
In this article I am going to explain about glob function in PHP.
PHP glob() Function
The filesystem glob function is used to searches for all the pathnames matching pattern according to the glob function.
Syntax of glob function
Parameters in glob function
It have two parameter:
Parameter |
Description |
pattern |
It specifies the pattern to search for. |
flags |
It is optional parameter. |
Example of filesystem glob function
<html>
<body>
<?php
print_r(glob("*.txt"));
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here