使用我的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
但在我的application / 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
答案 0 :(得分:-2)
$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;