0

hey guys apparently directory functions such as opendir, and scandir are not working on my host.
following is the code, its from php.net.

the output is keep on coming fail.
is there something wrong with my php settings or something else.

the page is,

http://worldofpakistan.net/try/write.php

<?php

$dir = "http://www.worldofpakistan.net/";
$dh  = scandir($dir);
if($dh)
{
echo "success";
}
else
{
echo "fail";
}

while (false !== ($filename = readdir($dh))) {
    $files[] = $filename;
}

sort($files);

print_r($files);

rsort($files);

print_r($files);

?>
2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by R0bb0b
0

im getting the following output:

Array ( [type] => 2 [message] => scandir() [function.scandir]: (errno 25): Inappropriate ioctl for device [file] => /home/worldofp/public_html/try/write.php [line] => 7 )

instead of the list of files and directories.

0

I've never seen that error and there's not much documentation on it so I would assume that it is a problem at the server level.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.