php 链接 foxpro
1 <?php 2 // SourceDB=D:/foxprodb; 数据库目录 3 $dsn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=D:/foxprodb;Exclusive=NO;collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;"; 4 $conn = odbc_connect( $dsn, "", "") ; 5 6 // $sql = "select * from 销售表 WHERE `编号` = '10162972'"; 7 // $sql = iconv( 'utf-8', 'gb2312', $sql ); 8 // $result_id = odbc_exec( $conn, $sql ); 9 10 // while ( $arr = odbc_fetch_array( $result_id ) ) { 11 // print_r( $arr ); 12 // } 13 14 $sql = "insert into zba VALUES( '9', '9' )"; 15 $sql = iconv( 'utf-8', 'gb2312', $sql ); 16 $result_id = odbc_exec( $conn, $sql ); 17 18 echo odbc_num_rows( $result_id ); 19 ?>