host.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. # 本配置文件会根据部署位置的不同而修改,此处请自行修改
  3. $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
  4. # 当前项目的主域名
  5. $host = 'http://old.xinnongbaohe.com/';
  6. # 定义assets的域名
  7. $assets_host = MAZE_PROJECT_HOST . 'assets/';
  8. # 跨域设置
  9. @header('Access-Control-Allow-Origin:*');
  10. //header('Access-Control-Allow-Origin:http://'.$local);
  11. return array
  12. (
  13. # 跟域名
  14. 'base' => MAZE_PROJECT_HOST,
  15. # cookie 域名
  16. 'cookie' => '.xinnongbaohe.com',
  17. # assets 核心库访问地址 一般用不到,如果想把所有资源都放到这里,就要启用
  18. 'core' => $host . 'assets/lib/',
  19. # assets网络路径
  20. 'assets' => $assets_host,
  21. 'css' => $assets_host . 'css/',
  22. 'js' => $assets_host . 'js/',
  23. 'img' => $assets_host . 'img/',
  24. # 合并之后的网络路径,填写之后自动合并资源,不填写则不合并
  25. //'merge' => $host . 'mazephp/data/assets/',
  26. # image图库的上传路径的域名(不带action)
  27. 'upload'=> $host . 'project/box/image/?upload',
  28. # image图库的访问域名
  29. 'image' => $host . 'mazephp/data/upload/',
  30. # image图库的上传路径的域名(不带action)
  31. 'upload' => 'http://image.xinnongbaohe.com/upload',
  32. # image图库的访问域名
  33. 'image' => 'http://img1.xinnongbaohe.com/',
  34. );