麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
php终于有了自己的内置的数据库抽象层类包了.
悬赏分:20 - 2007年08月18日

php终于有了自己的内置的数据库抽象层类包了.

PHP 5.1 Release Candidate 1 Available
[8-Aug-2005] PHP 5.1 Release Candidate 1 is now available! If all goes well, this RC will be followed by a release within a

couple of weeks.

Some of the key improvements of PHP 5.1 include:


  1. PDO (PHP Data Objects) - A new native database abstraction layer providing performance, ease-of-use, and flexibility.
    PDO(PHP Data Objects) - php5.1最增的数据库抽象层用于提供对数据库访问的对象,拥有良好的性能,易于使用和灵活性的特点.

  2. Significantly improved language performance mainly due to the new Zend Engine II execution architecture.
  3. The PCRE extension has been updated to PCRE 6.2.
  4. Many more improvements including lots of new functionality & many bug fixes, especially in regards to SOAP, streams and

    SPL.
  5. See the bundled NEWS file for a more complete list of changes.
    [/list=1]

    Everyone is encouraged to download and test this beta, although it is not yet recommended for mission-critical production

    use.


    *********************************************************

    简介

    The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each

    database driver that implements the PDO interface can expose database-specific features as regular extension functions. Note

    that you cannot perform any database functions using the PDO extension by itself; you must use a database-specific PDO driver

    to access a database server.

    在php中PDO 是一个轻量级的数据库访问抽象层,提供对数据库访问一致的接口。每一个数据库驱动访问接口均被实现封装在PDO相应的接口方

    法中,通过一系列正规的扩展方法去表现各种数据库的差异。需要注意的是,你不能通过使用数据库函数去实现PDO的扩展。你必要使用针对每

    一个数据库PDO去访问数据库服务器。
    (在php5.1中有多个PDO的dll文件,根据你的需要选择适合的去加载)


    安装


    Windows环境

    Follow the same steps to install and enable the PDO drivers of your choice.
    使用如下相同步骤去安装激活你选择的PDO驱动。

    Windows users can download the extension DLL php_pdo.dll as part of the PECL collection binaries from /downloads.php or a

    more recent version from a PHP 5 PECL Snapshot.
    Windows用户可以从php.net上或最近的PHP 5 PECL Snapshot下载作为PECL容器二进制扩展DLL文件的php_pdo.dll等一系列文件。

    To enable the PDO extension on Windows operating systems, you must add the following line to php.ini: extension=php_pdo.dll
    在WINDOWS操作系统中激活PDO的扩展,你需需要在php.ini中加入 extension=php_pdo.dll

    Next, choose the other DB specific DLL files and either use dl() to load them at runtime, or enable them in php.ini below

    php_pdo.dll.
    然后,选择相应的DB的DLL文件或者在程序中使用DL()函数去加载。

    For example: extension=php_pdo.dll
    extension=php_pdo_firebird.dll
    extension=php_pdo_mssql.dll
    extension=php_pdo_mysql.dll
    extension=php_pdo_oci.dll
    extension=php_pdo_oci8.dll
    extension=php_pdo_odbc.dll
    extension=php_pdo_pgsql.dll
    extension=php_pdo_sqlite.dll

    These DLLs should exist in the system's extension_dir. (这些文件在X:\php\ext文件夹中)

    (但是我好像没有找到php_pdo.dll文件,我直接加载php_pdo_mysql.dll也可以。)

    Linux and UNIX环境

    1. bash$ wget http://pecl.php.net/get/PDO
    2. export PATH="/usr/local/php5/binPATH"
    3.

    bash$ tar xzf PDO-0.9.tgz
    bash$ cd PDO-0.9
    bash$ phpize
    bash$ ./configure
    bash$ make
    bash$ sudo -s
    bash# make install
    bash# echo extension=pdo.so >> /usr/local/php5/lib/php.ini



    其它的东西,如何使用,等我先测试一下再说.

提问者:stangly_wrong   08-18 08:08
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
47 + 75 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM