"; //Begin Center Stack div. // $current_dir = "/home/brigandine/public_html/weblogs/"; $current_dir = "./"; //Path to directory containing all files. $dir = opendir($current_dir); echo "
\n"; echo "";
// Depending on how the server is setup PHP versions 4.1.0 supports the $_POST array.
// The $HTTP_POST_VARS will work with earlier versions of PHP but is not a super global.
// if register_globals is turned off you will need to put global $HTTP_POST_VARS
// at the top of the script for it to work.
// Change at your own risk.
if(isset($HTTP_POST_VARS['Filename'])){ // Only display output if the form has been submitted.
$filename = $HTTP_POST_VARS['Filename']; //here's the filename
$id = fopen($filename, "r"); //open the file
echo "Here's what " . $filename . " has to say.....
";
while ($data = fgetcsv($id, filesize($filename))) //start a loop
$table[] = $data; //put each line into its own entry in the $table array
fclose($id); //close file
$records = count($table); //Get the number of entries in the table array
$max_fields = count($table[0]); //Get the number of fields in the table array
for($row=$records-1; $row>0; $row--){ //Loop bass ackwards
echo "