This article mainly introduces the database configuration for using codeigniter in the Sina SAE cloud platform, mainly involving the database. for php configuration, you can refer to the restrictions imposed by Sina SAE on file permissions, so the cache directory cannot be modified, so the original Codeigniter cannot be used directly. Try codeIgniter 2.10 for SAE: http://code.google.com/p/ci-sae /.
Configure the following in database. php::
The code is as follows:
$ Db ['default'] ['hostname'] = SAE_MYSQL_HOST_M;
$ Db ['default'] ['username'] = SAE_MYSQL_USER;
$ Db ['default'] ['password'] = SAE_MYSQL_PASS;
$ Db ['default'] ['database'] = SAE_MYSQL_DB;
$ Db ['default'] ['dbdriver '] = 'mysqli ';
$ Db ['default'] ['dbprefix'] = '';
$ Db ['default'] ['pconnect '] = FALSE;
$ 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;
$ Db ['default'] ['port'] = SAE_MYSQL_PORT;
Note the $ db ['default'] ['dbdriver '] and $ db ['default'] ['pconnect'] items.Otherwise, the following error message is displayed:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader. php
Line Number: 346