【问题标题】:Cakephp multiple subdomainsCakephp 多个子域
【发布时间】:2012-10-20 10:14:11
【问题描述】:

我的共享服务器中目前有以下目录结构

/

-public_html

--subdomain_1

--- app

--- cake

--- cgi-bin

--- nbproject

--- plugin

--- vendors

我的问题是:

  1. 我需要什么来设置多个应用程序,每个应用程序都在自己的子域中,但共享相同的 cakephp 核心,例如 subdomain1.mydomain.com、subdomain2.mydomain.com 等,其结构如下:

/

-public_html

--subdomain_1

--- 应用程序

--- 蛋糕

--- cgi-bin

--- nb 项目

--- 插件

--- 供应商

--subdomain_2

--- 应用程序

--- 蛋糕

--- cgi-bin

--- nb 项目

--- 插件

--- 供应商

--subdomain_3

--- 应用程序

--- 蛋糕

--- cgi-bin

--- nb 项目

--- 插件

--- 供应商

  1. 请指出我应该修改我的应用程序中的哪些文件来回答
  2. 是否需要修改 htaccess 文件,如果需要,如何修改。

我将不胜感激。谢谢。

【问题讨论】:

    标签: cakephp subdomain


    【解决方案1】:

    就像the documentation 中所说的那样。

    由于您无法更改共享主机服务器上的 php.ini,只需更改每个 webroot/index.php 文件中的 CAKE_CORE_INCLUDE_PATH 常量,然后您只需上传 Cake 核心一次,让您的所有子域都使用它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-12
      • 2013-09-20
      • 1970-01-01
      • 2017-08-01
      相关资源
      最近更新 更多