If every row of the file is actually a SQL statement like so:
INSERT INTO table name VALUES (1, 'data', 'data', 'data' );
INSERT INTO table name VALUES (2, 'data', 'data', 'data' );
INSERT INTO table name VALUES (3, 'data', 'data', 'data' );
...
The all you need to do is load the file into an array with file() and then loop over the array executing each line as a query.
$f=$file('filelocation');
while(list($key,$value)=each($f)){
$result=odbc_exec($dbhandle,$value);
if(!$result){die("query failed: $value");}
}
I used an ODBC query, you may have another DB system. Depending on the rows, you may have to "clean" them up some as well (ie remove the semi colon).
If this file is, for example, a mySQL dump file, you could load the file much faster by using the mySQL client.