如何解决“调用未定义函数 dbase_open()"窗口中的错误
我想将 DBF 文件加载到 mysql,我使用的是 xampp,php 版本 5.5.6
Hi i want to load DBF file to mysql, am using xampp,php version 5.5.6
我写了下面的代码,
但出现错误 ---
致命错误:调用未定义的函数 dbase_open()C:xampphtdocsimportsimport_geo.php 在第 47 行
Fatal error: Call to undefined function dbase_open() in C:xampphtdocsimportsimport_geo.php on line 47
$dbf = dbase_open('OUTLETS/regions.dbf', 0);
$num_records = dbase_numrecords($dbf);
for($i=1;$i<=$num_records;$i++)
{
$record = dbase_get_record_with_names($dbf, $i);
$stmt_bricks->execute(array(
':id' => $next_brick_id,
':type' => 'Region',
':code' => $record['REG_CODE'],
':descr' => $record['REG_DESC'],
));
$regions_code_to_id[$record['REG_CODE']] = $next_brick_id++;
}
我在一篇文章中看到,我们必须在 php.ini 中取消注释 extension=php_gmp.dll
,但在我的 php.ini 中extension=php_gmp.dll
不可用,请帮帮我.
I saw in one article, we have to uncomment extension=php_gmp.dll
in php.ini, but in my php.ini
extension=php_gmp.dll
is not available, please help me.
提前致谢
推荐答案
dBase 暂时移至 PECL
dBase is moved to PECL for now
yum install php-pear
pecl install dbase
成功执行后,您需要将extension=dbase.so"添加到您的 php.ini 中
After successful execution, you'll need to add "extension=dbase.so" to your php.ini
或在/etc/php.d 中创建 dbase.ini
Or create dbase.ini in /etc/php.d with
extension=dbase.so
fliber.net 使用这个
相关文章