Re: [PHP] PHP script + read file

2004-11-21 Thread Jason Wong
On Sunday 21 November 2004 20:25, Jerry Swanson wrote: Please do not top post. > What is wrong with this code? Why $input_str is empty. > > if ($handle = opendir('/home/test2/')) { >echo "Directory handle: $handle\n"; >echo "Files:\n"; > >while (false !== ($file = readdir($handle))) {

Re: [PHP] PHP script + read file

2004-11-21 Thread Jerry Swanson
What is wrong with this code? Why $input_str is empty. if ($handle = opendir('/home/test2/')) { echo "Directory handle: $handle\n"; echo "Files:\n"; while (false !== ($file = readdir($handle))) { if($file != "." && $file != ".."){ $handle1 = fopen($file, "a+");

Re: [PHP] PHP script + read file

2004-11-20 Thread Jason Wong
On Sunday 21 November 2004 05:11, Jerry Swanson wrote: > I know how to read a file. But the problem is different, I have > directory that has more than 250 files. I need to read each file and > process it. But How I know what file to read? > ls -l (show all files). How I can select each file withou

Re: [PHP] PHP script + read file

2004-11-20 Thread Gerhard Meier
On Sat, Nov 20, 2004 at 09:11:41PM +, Jerry Swanson wrote: > I know how to read a file. But the problem is different, I have > directory that has more than 250 files. I need to read each file and > process it. But How I know what file to read? > ls -l (show all files). How I can select each fil

Re: [PHP] PHP script + read file

2004-11-20 Thread Jon-EIrik Pettersen
Jerry Swanson wrote: I know how to read a file. But the problem is different, I have directory that has more than 250 files. I need to read each file and process it. But How I know what file to read? ls -l (show all files). How I can select each file without knowing name? The file will be process a