Re: [wdvltalk] PHP woes

2005-06-09 Thread William Stewart
I assume they are. I haven't set the permissions in particular for either file. Thanks for your help! Will On 6/9/05 3:42 PM, "Sheila Fenelon" <[EMAIL PROTECTED]> wrote: > William Stewart wrote: >> Somedays I really wonder why I'm in this business. Today is one of those >> days! Hopefully so

Re: [wdvltalk] PHP woes

2005-06-09 Thread Sheila Fenelon
William Stewart wrote: Somedays I really wonder why I'm in this business. Today is one of those days! Hopefully someone knows the answer to my problem: I'm trying to use PHP with MovableType, but my pages give me a 500 error whenever it is in this location: http://www.cityuponahill.com/articl

[wdvltalk] PHP woes

2005-06-09 Thread William Stewart
Somedays I really wonder why I'm in this business. Today is one of those days! Hopefully someone knows the answer to my problem: I'm trying to use PHP with MovableType, but my pages give me a 500 error whenever it is in this location: http://www.cityuponahill.com/articles/archive/june/the_spiri

RE: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Steven Olson
Hi - My idea of sending to a file and counting the lines is essentially the same as several other suggestions: 1) Charles King suggested outputting to a array and then checking the contents of the array, and 2) Pat Richards suggested adding a counter, which would have exactly the same effect wit

RE: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Gerenday, Perry (P.)
Sheila Fenelon wrote: > How about this? > > $empty_dir = true; > if ($handle = opendir('./ssgi/')) { > while (false !== ($file = readdir($handle))) { > if ($file != "." && $file != "..") { > echo "$file\n"; > $empty_dir = false; > } > } > closedir($handle);

Re: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Galatek Webmaster
oops - Gave you the wrong array creation information; gave you the Perl equivalent. the PHP equiv is array_push($array, $file); The way that I used it was by calling the function to return the array to where I want to print i.e function getDirectory($path) { $array = array(); if ($handle =

Re: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Sheila Fenelon
How about this? $empty_dir = true; if ($handle = opendir('./ssgi/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; $empty_dir = false; } } closedir($handle); } if ($empty_dir) { echo "There are no files

RE: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Gerenday, Perry (P.)
Hang tight everyone. I'm not ignoring you. I'm systematically trying all your suggestions. So far with little success. My continued failure is probably due to my novice understanding of PHP. Charles: I thought the break would work too, but $file never evaluates to an empty string, even when I try

Re: [wdvltalk] PHP: determine if a directory is empty

2005-06-09 Thread Galatek Webmaster
just add a line to check for an empty string in $file and break the loop after printing the message you want to print. i.e. $continue = true; /* Set a BOOLEAN variable to keep the loop going as long as there are files */ if ($handle = opendir('./ssgi/')) { while (false !== ($file = r