Thread Allgemeines Problem mit CGI oder DBD-CSV (6 answers)
Opened by ChKrausse at 2014-10-14 22:54

GwenDragon
 2014-10-16 11:08
#177843 #177843
User since
2005-01-17
14748 Artikel
Admin1
[Homepage]
user image
Nein, es sucht nach Dateinen mit genau der Dateiendung .csv
Siehe Doku zu DBD::File.
Quote
f_ext

This attribute is used for setting the file extension. The format is:

extension{/flag}

where the /flag is optional and the extension is case-insensitive. f_ext allows you to specify an extension which:

f_ext => ".csv/r",

makes DBD::File prefer table.extension over table.


makes the table name the filename minus the extension.

DBI:CSV:f_dir=data;f_ext=.csv

In the above example and when f_dir contains both table.csv and table, DBD::File will open table.csv and the table will be named "table". If table.csv does not exist but table does that file is opened and the table is also called "table".

If f_ext is not specified and table.csv exists it will be opened and the table will be called "table.csv" which is probably not what you want.

NOTE: even though extensions are case-insensitive, table names are not.

DBI:CSV:f_dir=data;f_ext=.csv/r

The r flag means the file extension is required and any filename that does not match the extension is ignored.

Usually you set it on the dbh but it may be overridden per table (see f_meta).

View full thread Allgemeines Problem mit CGI oder DBD-CSV