How to solve quot;Call to undefined function dbase_open() quot; error in windows(如何解决“调用未定义函数 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 使用这个
这篇关于如何解决“调用未定义函数 dbase_open()"窗口中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何解决“调用未定义函数 dbase_open()"窗口中的错误
				
        
 
            
        - 带有通配符的 Laravel 验证器 2021-01-01
 - SoapClient 设置自定义 HTTP Header 2021-01-01
 - 如何定位 php.ini 文件 (xampp) 2022-01-01
 - PHP Count 布尔数组中真值的数量 2021-01-01
 - Mod使用GET变量将子域重写为PHP 2021-01-01
 - Laravel 仓库 2022-01-01
 - Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
 - 正确分离 PHP 中的逻辑/样式 2021-01-01
 - 从 PHP 中的输入表单获取日期 2022-01-01
 - 没有作曲家的 PSR4 自动加载 2022-01-01
 
				
				
				
				