common.conf.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?php
  2. /*
  3. * Common configuration that can be used throughout the application
  4. * Please refer to DooConfig class in the API doc for a complete list of configurations
  5. * Access via Singleton, eg. Doo::conf()->BASE_PATH;
  6. */
  7. error_reporting(E_ALL | E_STRICT);
  8. date_default_timezone_set('Asia/Shanghai');
  9. /**
  10. * for benchmark purpose, call Doo::benchmark() for time used.
  11. */
  12. //$config['START_TIME'] = microtime(true);
  13. //For framework use. Must be defined. Use full absolute paths and end them with '/' eg. /var/www/project/
  14. $config['SITE_PATH'] = SITE_PATH;
  15. //$config['PROTECTED_FOLDER'] = 'protected/';
  16. $config['BASE_PATH'] = BASE_PATH;
  17. //for production mode use 'prod'
  18. $config['APP_MODE'] = 'dev';
  19. //----------------- optional, if not defined, default settings are optimized for production mode ----------------
  20. //if your root directory is /var/www/ and you place this in a subfolder eg. 'app', define SUBFOLDER = '/app/'
  21. $config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\','/',$config['SITE_PATH']));
  22. if(strpos($config['SUBFOLDER'], '/')!==0){
  23. $config['SUBFOLDER'] = '/'.$config['SUBFOLDER'];
  24. }
  25. $config['APP_URL'] = 'http://'.$_SERVER['HTTP_HOST'].$config['SUBFOLDER'];
  26. //$config['AUTOROUTE'] = TRUE;
  27. $config['DEBUG_ENABLED'] = TRUE;
  28. //$config['TEMPLATE_COMPILE_ALWAYS'] = TRUE;
  29. //register functions to be used with your template files
  30. //$config['TEMPLATE_GLOBAL_TAGS'] = array('defined');
  31. /**
  32. * Path to store logs/profiles when using with the logger tool. This is needed for writing log files and using the log viewer tool
  33. */
  34. //$config['LOG_PATH'] = '/var/logs/';
  35. /**
  36. * defined either Document or Route to be loaded/executed when requested page is not found
  37. * A 404 route must be one of the routes defined in routes.conf.php (if autoroute on, make sure the controller and method exist)
  38. * Error document must be more than 512 bytes as IE sees it as a normal 404 sent if < 512b
  39. */
  40. //$config['ERROR_404_DOCUMENT'] = 'error.php';
  41. $config['ERROR_404_ROUTE'] = '/error';
  42. //用户权限配置
  43. //游客可以浏览的页面
  44. $config['VISITOR_USER']=array('index','synLogin',
  45. 'show_ask_page',
  46. 'login',
  47. 'show_into_home',
  48. 'show_home_answer',
  49. 'show_home_question',
  50. 'do_login',
  51. 'show_search',
  52. 'get_search_works',
  53. //登录
  54. 'do_login_index',
  55. 'show_messager',
  56. 'show_article_page',
  57. 'show_tip2',
  58. );
  59. $config['GENERAL_USER']=array('index', 'show_ask_page', 'login', 'show_into_home', 'show_home_answer', 'show_home_question', 'do_login', 'upload_question_img', 'show_home_per_info', 'show_home_avatar', 'show_home_message', 'show_vip_ask_post', 'show_ask_post', 'show_post_enter', 'show_search', 'do_support_answer', 'do_edit_answer', 'do_edit_question', 'do_up_price', 'do_add_supply', 'upload_avatar', 'do_update_vip_question', 'do_add_vip_question', 'do_delete_answer', 'do_delete_question', 'do_question_close', 'do_update_user_info', 'do_update_avatar', 'answer_again', 'do_reply_question', 'to_ask_question', 'do_add_vip_question', 'do_add_question','show_advisory_page','synLogin',
  60. 'user_exit',
  61. //编辑问题
  62. 'do_edit_vip_question',
  63. //设置满意
  64. 'set_vip_question_satisfy',
  65. //设置不满意
  66. 'set_vip_question_nosatisfy',
  67. //追加回答
  68. 'do_add_vip_tag',
  69. //评价回答
  70. 'do_comment_vip_answer',
  71. //添加评论
  72. 'do_add_discuss',
  73. //获取退款机会
  74. 'get_vip_refunds',
  75. //交易
  76. 'show_my_pay_oder',
  77. //充值
  78. 'show_my_recharge',
  79. //登录
  80. 'do_login_index',
  81. //充值记录
  82. 'show_recharge_oder',
  83. //编辑邮件
  84. 'do_add_email_config',
  85. 'do_best_answer',
  86. 'show_article_page',
  87. 'show_messager',
  88. 'show_tip2',
  89. 'get_search_works',
  90. );
  91. $config['VIP_USER']=array('index','synLogin',
  92. 'show_ask_page',
  93. 'login',
  94. 'show_into_home',
  95. 'show_home_answer',
  96. 'show_home_question',
  97. 'do_login',
  98. //普通会员
  99. 'upload_question_img',
  100. 'show_home_per_info',
  101. 'show_home_avatar',
  102. 'show_home_message',
  103. 'show_vip_ask_post',
  104. 'show_ask_post',
  105. 'show_post_enter',
  106. 'show_search',
  107. 'do_support_answer',
  108. 'do_edit_answer',
  109. 'do_edit_question',
  110. 'do_up_price',
  111. 'do_add_supply',
  112. 'upload_avatar',
  113. 'do_update_vip_question',
  114. 'do_add_vip_question',
  115. 'do_delete_answer',
  116. 'do_delete_question',
  117. 'do_question_close',
  118. 'do_update_user_info',
  119. 'do_update_avatar',
  120. 'answer_again',
  121. 'do_reply_question',
  122. 'to_ask_question',
  123. 'do_add_vip_question',
  124. 'do_add_question',
  125. 'do_best_answer',
  126. 'user_exit',
  127. //名师答疑
  128. 'show_advisory',
  129. 'search_show_advisory',
  130. //详情页
  131. 'show_advisory_page',
  132. //编辑问题
  133. 'do_edit_vip_question',
  134. //设置满意
  135. 'set_vip_question_satisfy',
  136. //设置不满意
  137. 'set_vip_question_nosatisfy',
  138. //追加回答
  139. 'do_add_vip_tag',
  140. //评价回答
  141. 'do_comment_vip_answer',
  142. //添加评论
  143. 'do_add_discuss',
  144. //获取退款机会
  145. 'get_vip_refunds',
  146. //我的订单
  147. 'show_my_pay_oder',
  148. //充值
  149. 'show_my_recharge',
  150. //登录
  151. 'do_login_index',
  152. //充值记录
  153. 'show_recharge_oder',
  154. //编辑邮件
  155. 'do_add_email_config',
  156. 'show_article_page',
  157. 'show_messager',
  158. 'show_tip2',
  159. 'get_search_works',
  160. );
  161. /**
  162. * Settings for memcache server connections, you don't have to set if using localhost only.
  163. * host, port, persistent, weight
  164. * $config['MEMCACHE'] = array(
  165. * array('192.168.1.31', '11211', true, 40),
  166. * array('192.168.1.23', '11211', true, 80)
  167. * );
  168. */
  169. /**
  170. * Defines modules that are allowed to be accessed from an auto route URI.
  171. * Example, we have a module in SITE_PATH/PROTECTED_FOLDER/module/example
  172. * It can be accessed via http://localhost/example/controller/method/parameters
  173. *
  174. * $config['MODULES'] = array('example');
  175. *
  176. */
  177. /**
  178. * Unique string ID of the application to be used with PHP 5.3 namespace and auto loading of namespaced classes
  179. * If you wish to use namespace with the framework, your classes must have a namespace starting with this ID.
  180. * Example below is located at /var/www/app/protected/controller/test and can be access via autoroute http://localhost/test/my/method
  181. * <?php
  182. * namespace myapp\controller\test;
  183. * class MyController extends \DooController {
  184. * .....
  185. * } ?>
  186. *
  187. * You would need to enable autoload to use Namespace classes in index.php
  188. * spl_autoload_register('Doo::autoload');
  189. *
  190. * $config['APP_NAMESPACE_ID'] = 'myapp';
  191. *
  192. */
  193. /**
  194. * To enable autoloading, add directories which consist of the classes needed in your application.
  195. *
  196. * $config['AUTOLOAD'] = array(
  197. //internal directories, live in the app
  198. 'class', 'model', 'module/example/controller',
  199. //external directories, live outside the app
  200. '/var/php/library/classes'
  201. );
  202. */
  203. /**
  204. * you can include self defined config, retrieved via Doo::conf()->variable
  205. * Use lower case for you own settings for future Compability with DooPHP
  206. */