在 Codeigniter 中使用 sqlite3 数据库

在 Codeigniter 中使用 mysql 数据库是轻而易举的事情,只要在 application/config/database.php 配置好数据库名称、帐号密码即可使用。

换成 sqlite 的话稍微麻烦点,Codeigniter 默认使用 PHP5 自带驱动来支持 sqlite 且该驱动只支持 sqlite 2.x 版本。好在从 Codeigniter 2.1 开始已经内置了 sqlite 的 pdo 驱动,通过 pdo 驱动就可以实现对 sqlite3 的支持。

编辑 application/config/database.php 里的选项:

$db['default']['hostname'] = 'sqlite:' . FCPATH . '../db/tms.db';$db['default']['username'] = '';$db['default']['password'] = '';$db['default']['database'] = '';$db['default']['dbdriver'] = 'pdo';$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;

这样就可以直接访问 sqlite 数据库了。

波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!

波比源码 » 在 Codeigniter 中使用 sqlite3 数据库

107 评论

  1. lamotrigine 200mg over the counter retin gel tablet cheap tretinoin gel

  2. buy generic cialis 20mg ed solutions order viagra 50mg pill

  3. order anastrozole 1 mg for sale Fda approved viagra buy sildenafil 100mg generic

  4. purchase doxycycline for sale buy clomid pills lasix 100mg usa

  5. revia 50mg without prescription oral femara 2.5 mg buy aripiprazole 30mg pills

  6. buy clozaril 100mg pills clozaril tablet order decadron 0,0,5 mg pills

  7. purchase cozaar topiramate brand purchase topiramate without prescription

  8. order sumatriptan online generic avodart avodart 0.5mg generic

  9. prednisone 10mg pills isotretinoin pill order amoxicillin 250mg online

  10. buy tadalafil online cheap tadacip price indocin 50mg oral

  11. order digoxin 250mg generic lanoxin 250 mg cost order molnupiravir without prescription

  12. tadalafil cost brand plavix purchase trimox generic

  13. esomeprazole 20mg us nexium ca buy lasix sale

  14. where to buy over the counter ed pills brand propecia 5mg order propecia 5mg

  15. order ondansetron 4mg without prescription zofran 8mg pills cost sulfamethoxazole

  16. ventolin 4mg sale augmentin oral order augmentin generic

  17. buy avlosulfon 100mg without prescription buy avlosulfon pill order atenolol online

  18. Everything is very open and very clear explanation of issues. was truly information. Click on the Keyword to Enter the Website. Wonodd

  19. buy generic duloxetine over the counter cheap duloxetine 20mg buy piracetam 800 mg online cheap

  20. buy estradiol generic estrace 2mg drug order prazosin 2mg without prescription

  21. order cleocin sale fildena oral fildena tablet

  22. buy nolvadex paypal ceftin uk ceftin cost

  23. furosemide 40mg canada order ventolin 2mg purchase ventolin inhalator generic

  24. buy generic vardenafil oral tizanidine plaquenil 400mg cost

  25. acetazolamide drug imuran oral imuran over the counter

发表评论

Hi, 如果你对这款模板有疑问,可以跟我联系哦!

联系站长
赞助VIP 享更多特权,建议使用 QQ 登录
喜欢我嘛?喜欢就按“ctrl+D”收藏我吧!♡