convention.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: luofei614 <weibo.com/luofei614>
  10. // +----------------------------------------------------------------------
  11. /**
  12. * SAE模式惯例配置文件
  13. * 该文件请不要修改,如果要覆盖惯例配置的值,可在应用配置文件中设定和惯例不符的配置项
  14. * 配置名称大小写任意,系统会统一转换成小写
  15. * 所有配置参数都可以在生效前动态改变
  16. */
  17. defined('THINK_PATH') or exit();
  18. $st = new SaeStorage();
  19. return array(
  20. //SAE下固定mysql配置
  21. 'DB_TYPE' => 'mysql', // 数据库类型
  22. 'DB_DEPLOY_TYPE' => 1,
  23. 'DB_RW_SEPARATE' => true,
  24. 'DB_HOST' => SAE_MYSQL_HOST_M.','.SAE_MYSQL_HOST_S, // 服务器地址
  25. 'DB_NAME' => SAE_MYSQL_DB, // 数据库名
  26. 'DB_USER' => SAE_MYSQL_USER, // 用户名
  27. 'DB_PWD' => SAE_MYSQL_PASS, // 密码
  28. 'DB_PORT' => SAE_MYSQL_PORT, // 端口
  29. //更改模板替换变量,让普通能在所有平台下显示
  30. 'TMPL_PARSE_STRING' => array(
  31. // __PUBLIC__/upload --> /Public/upload -->http://appname-public.stor.sinaapp.com/upload
  32. '/Public/upload' => $st->getUrl('public','upload')
  33. ),
  34. 'LOG_TYPE' => 'Sae',
  35. 'DATA_CACHE_TYPE' => 'Memcachesae',
  36. 'CHECK_APP_DIR' => false,
  37. 'FILE_UPLOAD_TYPE' => 'Sae',
  38. );