Home  >  Article  >  Backend Development  >  Database configuration using codeigniter under Sina SAE cloud platform_PHP tutorial

Database configuration using codeigniter under Sina SAE cloud platform_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:28:30825browse

Due to Sina SAE's restrictions on file permissions, the cache directory cannot modify permissions, so the original Codeigniter cannot be used directly. You can try codeIgniter 2.10 for SAE: http://code.google.com/p/ci-sae/.

is configured as follows in database.php:

Copy code 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;

Pay attention to the $db['default']['dbdriver'] and $db['default']['pconnect'] items , otherwise the following error message will appear:

A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/788611.htmlTechArticleDue to Sina SAE’s restrictions on file permissions, the cache directory cannot modify the permissions, so the original Codeigniter cannot be used directly. You can try codeIgniter 2.10 for SAE: http://code.google.com/...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn