| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- <?php
- /*
- * Common configuration that can be used throughout the application
- * Please refer to DooConfig class in the API doc for a complete list of configurations
- * Access via Singleton, eg. Doo::conf()->BASE_PATH;
- */
- error_reporting(E_ALL | E_STRICT);
- date_default_timezone_set('Asia/Shanghai');
- /**
- * for benchmark purpose, call Doo::benchmark() for time used.
- */
- //$config['START_TIME'] = microtime(true);
- //For framework use. Must be defined. Use full absolute paths and end them with '/' eg. /var/www/project/
- $config['SITE_PATH'] = SITE_PATH;
- //$config['PROTECTED_FOLDER'] = 'protected/';
- $config['BASE_PATH'] = BASE_PATH;
- //for production mode use 'prod'
- $config['APP_MODE'] = 'dev';
- //----------------- optional, if not defined, default settings are optimized for production mode ----------------
- //if your root directory is /var/www/ and you place this in a subfolder eg. 'app', define SUBFOLDER = '/app/'
- $config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\','/',$config['SITE_PATH']));
- if(strpos($config['SUBFOLDER'], '/')!==0){
- $config['SUBFOLDER'] = '/'.$config['SUBFOLDER'];
- }
- $config['APP_URL'] = 'http://'.$_SERVER['HTTP_HOST'].$config['SUBFOLDER'];
- //$config['AUTOROUTE'] = TRUE;
- $config['DEBUG_ENABLED'] = TRUE;
- //$config['TEMPLATE_COMPILE_ALWAYS'] = TRUE;
- //register functions to be used with your template files
- //$config['TEMPLATE_GLOBAL_TAGS'] = array('defined');
- /**
- * Path to store logs/profiles when using with the logger tool. This is needed for writing log files and using the log viewer tool
- */
- //$config['LOG_PATH'] = '/var/logs/';
- /**
- * defined either Document or Route to be loaded/executed when requested page is not found
- * A 404 route must be one of the routes defined in routes.conf.php (if autoroute on, make sure the controller and method exist)
- * Error document must be more than 512 bytes as IE sees it as a normal 404 sent if < 512b
- */
- //$config['ERROR_404_DOCUMENT'] = 'error.php';
- $config['ERROR_404_ROUTE'] = '/error';
- //用户权限配置
- //游客可以浏览的页面
- $config['VISITOR_USER']=array('index','synLogin',
- 'show_ask_page',
- 'login',
- 'show_into_home',
- 'show_home_answer',
- 'show_home_question',
- 'do_login',
- 'show_search',
- 'get_search_works',
- //登录
- 'do_login_index',
- 'show_messager',
- 'show_article_page',
- 'show_tip2',
- );
- $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',
- 'user_exit',
- //编辑问题
- 'do_edit_vip_question',
- //设置满意
- 'set_vip_question_satisfy',
- //设置不满意
- 'set_vip_question_nosatisfy',
- //追加回答
- 'do_add_vip_tag',
- //评价回答
- 'do_comment_vip_answer',
- //添加评论
- 'do_add_discuss',
- //获取退款机会
- 'get_vip_refunds',
- //交易
- 'show_my_pay_oder',
- //充值
- 'show_my_recharge',
- //登录
- 'do_login_index',
- //充值记录
- 'show_recharge_oder',
- //编辑邮件
- 'do_add_email_config',
- 'do_best_answer',
- 'show_article_page',
- 'show_messager',
- 'show_tip2',
- 'get_search_works',
- );
- $config['VIP_USER']=array('index','synLogin',
- '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',
- 'do_best_answer',
- 'user_exit',
- //名师答疑
- 'show_advisory',
- 'search_show_advisory',
- //详情页
- 'show_advisory_page',
- //编辑问题
- 'do_edit_vip_question',
- //设置满意
- 'set_vip_question_satisfy',
- //设置不满意
- 'set_vip_question_nosatisfy',
- //追加回答
- 'do_add_vip_tag',
- //评价回答
- 'do_comment_vip_answer',
- //添加评论
- 'do_add_discuss',
- //获取退款机会
- 'get_vip_refunds',
- //我的订单
- 'show_my_pay_oder',
- //充值
- 'show_my_recharge',
- //登录
- 'do_login_index',
- //充值记录
- 'show_recharge_oder',
- //编辑邮件
- 'do_add_email_config',
- 'show_article_page',
- 'show_messager',
- 'show_tip2',
- 'get_search_works',
- );
- /**
- * Settings for memcache server connections, you don't have to set if using localhost only.
- * host, port, persistent, weight
- * $config['MEMCACHE'] = array(
- * array('192.168.1.31', '11211', true, 40),
- * array('192.168.1.23', '11211', true, 80)
- * );
- */
- /**
- * Defines modules that are allowed to be accessed from an auto route URI.
- * Example, we have a module in SITE_PATH/PROTECTED_FOLDER/module/example
- * It can be accessed via http://localhost/example/controller/method/parameters
- *
- * $config['MODULES'] = array('example');
- *
- */
- /**
- * Unique string ID of the application to be used with PHP 5.3 namespace and auto loading of namespaced classes
- * If you wish to use namespace with the framework, your classes must have a namespace starting with this ID.
- * Example below is located at /var/www/app/protected/controller/test and can be access via autoroute http://localhost/test/my/method
- * <?php
- * namespace myapp\controller\test;
- * class MyController extends \DooController {
- * .....
- * } ?>
- *
- * You would need to enable autoload to use Namespace classes in index.php
- * spl_autoload_register('Doo::autoload');
- *
- * $config['APP_NAMESPACE_ID'] = 'myapp';
- *
- */
- /**
- * To enable autoloading, add directories which consist of the classes needed in your application.
- *
- * $config['AUTOLOAD'] = array(
- //internal directories, live in the app
- 'class', 'model', 'module/example/controller',
- //external directories, live outside the app
- '/var/php/library/classes'
- );
- */
- /**
- * you can include self defined config, retrieved via Doo::conf()->variable
- * Use lower case for you own settings for future Compability with DooPHP
- */
|