<?php
//Open send directory
if(@$dir = @dir("send"))
{
//List files in send directory
while (($file = $dir->read()) !== false)
{
echo "filename: " . $file . "<br />";
}
$dir->close();
}
else
{
echo 'directory not opened';
}
?>
output :
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
note :
"send" is a directory name
//Open send directory
if(@$dir = @dir("send"))
{
//List files in send directory
while (($file = $dir->read()) !== false)
{
echo "filename: " . $file . "<br />";
}
$dir->close();
}
else
{
echo 'directory not opened';
}
?>
output :
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
note :
"send" is a directory name