I have some code (pinched from some google search) that has been added to a user-defined tag and is supposed to give me a list of files in the specified directory.
However, on running it, it only produces the "pre..." and "post" code lines.
I want to use it so that any new procedures added to the directory will be displayed automatically.
Any ideas?
Code: Select all
echo("<h3>--- Pre dir code ---</h3>");
$dir = "\\server\share\procedures";
$dh = opendir(dirname($dir));
while (false !== ($filename = readdir($dh))) {
echo($filename . " ");
}
echo("<h3>--- Post dir code ---</h3>");