Hi guys,
There must be something weird about the CPanel directory system.
I did the following script but it doesn't work.
I put a dir.php on the root of my Cpanel skin.
This script is supposed to output 'There is a mail folder' if it detects a folder with the name 'mail'
Obviously there is a folder 'mail' in the cpanel skin, but i got an error.
the code
<?
$handle = opendir(mail);
while($filename = readdir($handle))
{
if ($filename != "." && $filename != "..")
{
if(is_dir($filename))
print '<font color="#0033CC">There is a mail folder</font>';
}
}
?>
The error
Warning: OpenDir: No such file or directory (errno 2) in /tmp/cpanel.auto.1052482570.5401 on line 4
Warning: readdir(): supplied argument is not a valid Directory resource in /tmp/cpanel.auto.1052482570.5401 on line 6
What is wrong here?
Is there any solution to this?
There must be something weird about the CPanel directory system.
I did the following script but it doesn't work.
I put a dir.php on the root of my Cpanel skin.
This script is supposed to output 'There is a mail folder' if it detects a folder with the name 'mail'
Obviously there is a folder 'mail' in the cpanel skin, but i got an error.
the code
<?
$handle = opendir(mail);
while($filename = readdir($handle))
{
if ($filename != "." && $filename != "..")
{
if(is_dir($filename))
print '<font color="#0033CC">There is a mail folder</font>';
}
}
?>
The error
Warning: OpenDir: No such file or directory (errno 2) in /tmp/cpanel.auto.1052482570.5401 on line 4
Warning: readdir(): supplied argument is not a valid Directory resource in /tmp/cpanel.auto.1052482570.5401 on line 6
What is wrong here?
Is there any solution to this?