BaseController.class.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. if (!defined('IS_INITPHP')) exit('Access Denied!');
  3. class BaseController extends Controller{
  4. protected function _init(){
  5. //����Services�ļ�
  6. includeIfExist(C('APP_FULL_PATH').'/Service/BaseService.class.php');
  7. includeIfExist(C('APP_FULL_PATH').'/Service/ApiService.class.php');
  8. includeIfExist(C('APP_FULL_PATH').'/Service/HisService.class.php');
  9. includeIfExist(C('APP_FULL_PATH').'/Service/OtherService.class.php');
  10. //����dao��common�ļ�
  11. includeIfExist(C('APP_FULL_PATH').'/Dao/DatabaseDao.class.php');
  12. includeIfExist(C('APP_FULL_PATH').'/Lib/common.class.php');
  13. //���������ļ�
  14. include C('APP_FULL_PATH').'/FlowConfig/apiConfig.php';
  15. include C('APP_FULL_PATH').'/FlowConfig/hisConfig.php';
  16. include C('APP_FULL_PATH').'/FlowConfig/remoteConfig.php';
  17. include C('APP_FULL_PATH').'/FlowConfig/otherConfig.php';
  18. $flowConfig = array_merge($apiConfig,$otherConfig,$hisConfig,$remoteConfig);
  19. C($flowConfig);
  20. //���� COMMON new ����
  21. $_ENV["commonClass"] = new commonClass();
  22. //��������DAO��
  23. $_ENV["dbDao"] = new DatabaseDao();
  24. //д��ο� ��־
  25. $note = "IP:".call_user_func(array($_ENV["commonClass"],"ip"))." �������: http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  26. Log::getpost($note);
  27. }
  28. }