Re: Open Dir
| From: | Tan JH | Date: | Fri, 08 Sep 2000 06:06:35 +0000 |
| Subject: | Re: Open Dir | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15831@lists.php.net to get a copy of this message | ||
I already managed to get it done.
-----Original Message-----
From: Tan JH jenhwi@visto.com
Sent: Thu, 07 Sep 2000 22:29:43 -0700
To: php-general@lists.php.net
Subject: [PHP] Open Dir
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based
communications center.
Visto.com. Life on the Dot.