On Mon, 2002-05-13 at 20:01, Josh Edwards wrote: > Thanks heaps for your help I really appreciate it. I have made the changes > you suggested but now I only get a blank screen. > > function getmydate($hit) > { > $single = explode (" ",$hit); > return $single[3].$single[4]; > } > > $filename = ("combined_log"); > > //fopen ($filename, "r"); > > $fcontents = file($filename); > $limit = 1; > for ($i = 0; $i <= $limit; $i++) > { > $line = $fcontents[i]; > if (!empty($line)) > { > $currentdate = getmydate($line); > echo $currentdate; > } > }
Things to check: o Put 'error_reporting(E_ALL);' as the first line of your script. o Are you sure it's reading the file? Try 'print_r($fcontents);' after the file() call. That might get you a little farther. Otherwise post a few representative lines from combined_log; otherwise we won't have any real data to work with. -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php