In reply to:
I got a snobbish reply from customer service about this - they suggested a problem with my code!
Oh noes! You have a bug!
In reply to:
Very rude, never have problems with this procedure on other servers, and they suggested I compile my own version! - Very slack.
Well if you modify the source and compile your own version, you can fix the bugs in your PHP code by turning them into features instead! Wait...does this mean Microsoft has invaded DreamHost? And how dare they not fix your bugs since you pay them to host your site! Software development should be included free.
In reply to:
I feel it is not my job to make the server work according to the PHP manual.
I feel it is not my job to debug your code. How about we switch, you debug your code and I'll make the server work according to the manual? I really can't decide which one will be easier!
In reply to:
Anyhow, searching has not helped me solve this problem, so can anyone suggest what the story is?
Well since == is not an assignment operator $file never gets a value and it goes downhill from there.
Now tell me was DreamHost support as snobbish and rude as me? I wanna be better than them at something.
Oh and BTW in case you are curious here is code that actually works:
$dh = '.';
$path = realpath($path);
if ($handle = opendir($path)) {
print "<p>Reading filenames in $path</p>n";
while (false !== ($file = readdir($handle))) {
if ($file != '.' and $file != '..' and filetype($path.'/'.$file) == 'file') {
print "<p>$file</p>n";
}
}
closedir($handle);
print "<p>Done reading $path</p>n";
}
else {
print "<p>Unable to open directory: $path</p>n";
}
Atropos | openvein.org