<?php
//Open send directory
if(@$dir = opendir("send"))
{//List files in send directory
while (($file = readdir($dir)) !== false)
{
echo "filename: ". $file ."<br />";
}
closedir($dir);
}
else
{
echo 'directory not opened';
}
?>
outputs :
1)
directory not opened
2)
filename: .
filename: ..
filename: sendsms.html
filename: sendsms.php
filename: send_vard.php
filename: send_vcard_sms.html
filename: smser.php
//Open send directory
if(@$dir = opendir("send"))
{//List files in send directory
while (($file = readdir($dir)) !== false)
{
echo "filename: ". $file ."<br />";
}
closedir($dir);
}
else
{
echo 'directory not opened';
}
?>
outputs :
1)
directory not opened
2)
filename: .
filename: ..
filename: sendsms.html
filename: sendsms.php
filename: send_vard.php
filename: send_vcard_sms.html
filename: smser.php