使用我的Codeigniter 2.2版本和PHP版本5.5.16-1+deb.sury.org~trusty+1和Mysql客户端API版本5.5.38,我得到错误:
Message: mysql_insert_id(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead但在我的应用程序/config/database.php中设置了'mysqli‘:
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'bp_';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;出什么问题了?哪种格式是pdo的有效格式?我需要从我的
# apt-cache search pdo
ifupdown - high level tools to configure network interfaces
php5-mysql - MySQL module for php5
php5-odbc - ODBC module for php5
php5-pgsql - PostgreSQL module for php5
php5-sqlite - SQLite module for php5
gap-gapdoc - GAPDoc meta package for GAP documentation
guessnet - Guess which LAN a network device is connected to
ifupdown-extra - Network scripts for ifupdown
ifupdown-multi - multiple default gateway support for ifupdown
ifupdown-scripts-zg2 - Zugschlus' interface scripts for ifupdown's manual method
irssi-scripts - collection of scripts for irssi
libjnlp-servlet-java - simple and convenient packaging format for JNLP applications
mediawiki-extensions-base - Extensions for MediaWiki -- Base package
netscript-2.4 - Linux 2.4/2.6 router/firewall/VM host network config. system.
netscript-2.4-upstart - Linux 2.4/2.6 router/firewall/VM host network config. system.
pd-pdogg - collection of Ogg/Vorbis objects for Pd
php-apigen - API documentation generator for PHP 5.3+
php-db - PHP PEAR Database Abstraction Layer
php-mdb2 - merge of the PEAR DB and Metabase php database abstraction layers
php-phpdocx - dynamical generation of .docx files
php-structures-datagrid - Render a data table with automatic pagination and sorting
php5-mysqlnd - MySQL module for php5 (Native Driver)
php5-mysqlnd-ms - MySQL replication and load balancing module for PHP
php5-sybase - Sybase / MS SQL Server module for php5
python-setupdocs - setuptools plugin that automates building of docs from reST source
python-sphinxcontrib-httpdomain - Sphinx domain for HTTP APIs
python-sphinxcontrib.phpdomain - Sphinx "phpdomain" extension
sheepdog - distributed storage system for QEMU发布于 2014-08-28 13:46:56
$active_group = 'default';
$active_record = TRUE;从这里改正它。您可以将其更改为mysql
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;https://stackoverflow.com/questions/25541383
复制相似问题