Answer the question
In order to leave comments, you need to log in
How to upload to dbf using php?
Hello! I need to upload a table from mysql to dbf file with dbf file structure:
Field name | Field type | Width | Fraction part |
---|---|---|---|
CODE_MO | character | 5 | |
KUSL | character | fifteen | |
DATN | Date | eight | |
DATO | Date | eight | |
TARIF | Numeric | ten | 2 |
<?php
// база данных "definition"
$def = array(
array("date", "D"),
array("name", "C", 50),
array("age", "N", 3, 0),
array("email", "C", 128),
array("ismember", "L")
);
// создаем
if (!dbase_create('/tmp/test.dbf', $def)) {
echo "Ошибка, не получается создать базу данных\n";
}
?>
PHP Fatal Error – yii\base\ErrorException
Call to undefined function app\controllers\dbase_create()
Answer the question
In order to leave comments, you need to log in
You won't be able to create any dbf without installing the dbase dll.
Here is the dbase extension under win php, select the necessary one (TS / NTS, you can find out by typing php -v, in the console ), add it to ini, then call the extension functions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question