Page 1 of 1
open dbf files
Posted: Fri Mar 09, 2007 12:45 pm
by bouncer
what is wrong with this code ?
i cant open the file, dont know why, can someone help me ?
Code: Select all
$db = @dbase_open('Exist.dbf', 0);
if ($db) {
$record_numbers = dbase_numrecords($db);
for ($i = 1; $i <= $record_numbers; $i++) {
echo $record_numbers[$i];
}
}
thanks in advance
Posted: Fri Mar 09, 2007 12:48 pm
by volka
remove the @ and let the script start with
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors', true);
Posted: Fri Mar 09, 2007 12:53 pm
by bouncer
if i remove @ appeas this:
" Fatal error: Call to undefined function dbase_open() "
thanks in advance
Posted: Fri Mar 09, 2007 12:57 pm
by volka
You need the dbase extension. How you get, install and load it depends on the webserver's os.
Posted: Fri Mar 09, 2007 12:58 pm
by bouncer
are you talking about the dbase.dll ???
Posted: Fri Mar 09, 2007 12:59 pm
by volka
If it's a win32 server then I'm talking about php_dbase.dll
Posted: Fri Mar 09, 2007 1:02 pm
by bouncer
yes is a win32, and i already have that dll
Posted: Fri Mar 09, 2007 1:03 pm
by volka
Having is one thing, telling php to use it the other.
see
http://de2.php.net/manual/en/install.wi ... nsions.php
Posted: Fri Mar 09, 2007 1:09 pm
by bouncer
i have already done that....and nothing

Posted: Fri Mar 09, 2007 1:10 pm
by volka
You did it wrontg. Check again.
Posted: Fri Mar 09, 2007 1:16 pm
by bouncer
it's everything fine...dont understand...in php.ini-dist and php.ini-recommended files i have uncomment extension=php_dbase.dll
Posted: Fri Mar 09, 2007 1:19 pm
by volka
call <?php phpinfo(); ?> and see which php.ini is used. This file you have to edit. Don't forget to restart the webserver (software) when you're done.
Posted: Fri Mar 09, 2007 1:24 pm
by bouncer
ok, i'll go check that
thanks in advance