Home > Backend Development > PHP Tutorial > How to use codeigniter database configuration on Sina SAE Cloud Platform?

How to use codeigniter database configuration on Sina SAE Cloud Platform?

WBOY
Release: 2016-07-25 08:53:09
Original
1126 people have browsed it
  1. $db['default']['hostname'] = SAE_MYSQL_HOST_M;
  2. $db['default']['username'] = SAE_MYSQL_USER;
  3. $db['default']['password'] = SAE_MYSQL_PASS;
  4. $db['default']['database'] = SAE_MYSQL_DB;
  5. $db['default']['dbdriver'] = 'mysqli';
  6. $db['default']['dbprefix'] = '';
  7. $db['default']['pconnect'] = FALSE;
  8. $db['default']['db_debug'] = TRUE;
  9. $db['default']['cache_on'] = FALSE;
  10. $db['default']['cachedir'] = '';
  11. $db['default']['char_set'] = 'utf8';
  12. $db['default']['dbcollat'] = 'utf8_general_ci';
  13. $db['default']['swap_pre'] = '';
  14. $db['default']['autoinit'] = TRUE;
  15. $db['default']['stricton'] = FALSE;
  16. $db['default']['port'] = SAE_MYSQL_PORT;
复制代码

注意,其中$db['default']['dbdriver'] 与$db['default']['pconnect']项,否则会有错误提示: A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 346



source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template