将webroot目录的名称更改为cakephp中的其他名称

时间:2013-09-12 12:44:28

标签: cakephp

我想在cakephp中更改根目录(webroot)的名称,有没有办法这样做?

想要隐藏用户在cakephp中构建的网站,那么还有其他技术吗?

我正在使用cakephp 2.3.9,

我已经为此做了足够的准备,之后我在这里提出了问题,所以请不要投票。如果它不可能只是评论它

-app
--Config
--Console
--Controller
--Lib
--Locale
--Model
--Plugin
--View
--webroot (now want to rename this directory name)
---js
---css
---img
-lib
-plugins

enter image description here

我不想将该文件夹移动到任何其他想要重命名的地方

2 个答案:

答案 0 :(得分:1)

在/app/webroot/index.php或新案例/app/new-name/index.php中添加以下行:

define('WWW_ROOT', '/full/path/to/new-name/');
define('WEBROOT_DIR', 'new-name');

答案 1 :(得分:0)

你读过这个:

http://book.cakephp.org/2.0/en/installation/advanced-installation.html

可能回答你的问题?