$uploadErrors = array( 0=>"There is no error, the file uploaded with success", 1=>"The uploaded file exceeds the upload_max_filesize directive in php.ini", 2=>"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", 3=>"The uploaded file was only partially uploaded", 4=>"No file was uploaded", 6=>"Missing a temporary folder" ); print $uploadErrors[$_FILES[$upload_name]["error"]]; } } //print $_FILES[$upload_name]['name'] . "<br/>"; //do the import... include("fin.php"); $f = new Finance(); $f->setDb($db); $db->Query("BEGIN TRANSACTION"); $file=fopen($target,"r"); $lastTyp = ''; $errors = array(); $OCRRows = array(); $fileDat = array(); while(!feof($file)) { $line = fgets($file); //split by file definition... $typ = substr($line,0,2); $dat = array(); switch($typ) { case '00': //Detta kall ändras då det är BG som kommer änvändas framöver. Fundera även över hur vi ska lösa så att det går att köra bägge samtidigt.