Open Dir
| From: | Tan JH | Date: | Fri, 08 Sep 2000 05:29:43 +0000 |
| Subject: | Open Dir | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15829@lists.php.net to get a copy of this message | ||
Hi everyone,
Can anyone help me in how to open dir from my current php file?
When I tried, this warning message comes out:
Warning: ChDir: No such file or directory (errno 2) in /home/jhtan/public_html/Document.php on line
33
The dir that I wish to open is "Report" and it is in the same level as the
"public_html" dir.
This is the php coding that I wrote:
chdir ("\public_html");
$dir = dir(".");
$dir->rewind();
echo ("$dir");
if (is_dir($dir))
{
while ($file=3Dreaddir($dir))
{
echo ("$file<br>");
}
}
else
echo ("Could not open dir $dir...");
?>
The output that I get is as below:
Warning: ChDir: No such file or directory (errno 2) in /home/jhtan/public_html/Document.php on line
33
ObjectCould not open dir Object...
Please help.
Thank you in advance...
___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based
communications center.
Visto.com. Life on the Dot.