查看一下.ini中mysqli扩展有没有加载

解决方案 »

  1.   

    转载
     Try these: - edit the "php.ini" file and check that "extension_dir" entry is set- in "php.ini", go to Windows Extensions area and check that extension=php_mysql.dll line exists- on hard disk, go to the folder set by "extension_dir" at first step and check that "php_mysql.dll" file is copied there.Because the MySQL changed the licensing type some time ago the PHP guys were forced by this new license to not distribute the php_mysql module as an active module default into their configuration. This problem created a lots of confusion because like into your case you have to enable the extension as my colleague has already described you but you also have to copy the mysql client library against which this module was compiled from the PHP5 distro folder into the C:/Windows/system32 or to any other path that is it present on your server PATH configuration otherwise the module won't function.
      

  2.   

    我已经检查过了,php.ini没问题,相关文件也复制到了C:/Windows/system32 就是会有这样的问题
      

  3.   

    唉,不知道怎么回事,刚才用mysql_connect()函数可以连接到数据库,但是用mysqli方式却不行