is this a bug?
| From: | Data Driven Design | Date: | Thu, 29 Jun 2000 19:14:02 +0000 |
| Subject: | is this a bug? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-754@lists.php.net to get a copy of this message | ||
I posted this to the general list earlier and received no reply. This code
worked fine with php3. I just did a clean install of windows and installed
PHP 4.0.1 and this code:
<BODY>
<h1>Welcome to Administration Page</h1>
<h3>Choose an Option</h3><ul>
<?php
// open directory
$myDir = opendir(".");
// get each listing
rewinddir($myDir);
while($file_in_dir = readdir($myDir)) {
if (!(($file_in_dir == ".") || ($file_in_dir == "..") || ($file_in_dir ==
"index.php"))) {
print "<li><a href=\"$file_in_dir\">" . filetype($file_in_dir) .
" -
$file_in_dir</a></li>\n";
}
}
closedir($myDir);
?>
</ul>
</BODY>
Gives me these messages, but it works fine SOMETIMES.
Warning: 1 is not a valid Directory resource in C:\Work\index.php on line 20
Warning: 1 is not a valid Directory resource in C:\Work\index.php on line 21
Warning: 1 is not a valid Directory resource in C:\Work\index.php on line 26
Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084
Phone : (904) - 226-8979
URL : http://www.datadrivendesign.com
URL : http://www.rossidesigns.net