Home > Backend Development > PHP Tutorial > dbase_open打开dbf文件,只有2行代码

dbase_open打开dbf文件,只有2行代码

WBOY
Release: 2016-06-13 13:06:31
Original
1154 people have browsed it

求助:dbase_open打开dbf文件,只有2行代码~
注:extension=php_dbase.dll 已经默认开启

代码如下:

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<?php $file_dbf = 'test.dbf';
$db = dbase_open($file_dbf,0);
?>

Copy after login


出现错误提示:
Warning: dbase_open() [function.dbase-open]: unable to open database test.dbf in F:\web\AppServ\www\test\dbf.php on line 3

我试了很多路径都出现同样的警告:(路径是正确的)
$file_dbf = 'test.dbf';
$file_dbf = '/test.dbf';
$file_dbf = ./test.dbf';
$file_dbf = 'http://localhost/test/test.dbf';
$file_dbf = 'F:\web\AppServ\www\test\test.dbf';
$file_dbf = 'F:/web/AppServ/www/test/test.dbf';

请问这是什么原因?应该如何解决?谢谢~

------解决方案--------------------
用 ODBC

VFP(.dbc, .dbf) 
标准连接: 
"Provider=vfpoledb;Data Source=C:\DatabasePath\MyDatabase.dbc; " 
或 
"Provider=VFPOLEDB.1;Data Source=d:\temp;Password= " ";Collating Sequence=MACHINE " 
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template