首页上一页 1 下一页尾页 1 条记录 1/1页
《实战突击php项目开发案例整合》第一章中没有adodb/adodb.inc.php
发表在PHP图书答疑
2012-09-03
是否精华
是
否
版块置顶:
是
否
《实战突击php项目开发案例整合》第一章中没有adodb/adodb.inc.php 如何解决?
conn.php
<?php
$filepath=__FILE__;
$newarray=explode("\\",$filepath);
$num=count($newarray)-1;
$filenamelen=strlen($newarray[$num]);
$totallen=strlen(__FILE__);
$subnum=$totallen-$filenamelen-5;
$tmppath=substr(__FILE__,0,$subnum);
$newpath=$tmppath."db\db_meeting.mdb"; //数据库路径
include "adodb/adodb.inc.php"; //载入adodb
$conn = ADONewConnection('access'); //建立accessl连接
$conn->Pconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$newpath");
$conn->execute("set names gb2312");
?>
conn.php
<?php
$filepath=__FILE__;
$newarray=explode("\\",$filepath);
$num=count($newarray)-1;
$filenamelen=strlen($newarray[$num]);
$totallen=strlen(__FILE__);
$subnum=$totallen-$filenamelen-5;
$tmppath=substr(__FILE__,0,$subnum);
$newpath=$tmppath."db\db_meeting.mdb"; //数据库路径
include "adodb/adodb.inc.php"; //载入adodb
$conn = ADONewConnection('access'); //建立accessl连接
$conn->Pconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$newpath");
$conn->execute("set names gb2312");
?>