嗨,我想加载DBF文件到
mysql,使用xampp,PHP版本5.5.6
@H_301_20@
dBase现在转移到PECL
我写了下面的代码,
但我得到错误—
Fatal error: Call to undefined function dbase_open() in
C:\xampp\htdocs\imports\import_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不可用,请帮帮我.
提前致谢
yum install PHP-pear pecl install dbase
成功执行后,您需要在PHP.ini中添加“extension = dbase.so”
或者在/etc/PHP.d中创建dbase.ini
extension=dbase.so
fliber.net使用此