2011-12-14 164 views
0

我有一個CakePHP站點「inheirted」。我已將網站文件夾放入本地主機並設置數據庫配置。它似乎正在加載視圖,但.css和圖像未被加載,並且鏈接直接指向本地主機。設置本地主機上的CakePhp

localhost/categorys 

而不是

localhost/mysite/categorys 

是否有一個配置,我需要設置,以確保一切指向正確?

+0

你看過服務器日誌嗎? – 2011-12-14 23:40:02

+0

不,我沒有看過他們 – james 2011-12-14 23:41:41

回答

0

在你的app/webroot目錄中配置你的index.php文件。

滾動到說,部分:

/** 
* The full path to the directory which holds "app", WITHOUT a trailing DS. 
* 
*/ 
    if (!defined('ROOT')) { 
     define('ROOT', dirname(dirname(dirname(__FILE__)))); 
    } 
/** 
* The actual directory name for the "app". 
* 
*/ 
    if (!defined('APP_DIR')) { 
     define('APP_DIR', basename(dirname(dirname(__FILE__)))); 
    } 
/** 
* The absolute path to the "cake" directory, WITHOUT a trailing DS. 
* 
*/ 
    if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
     define('CAKE_CORE_INCLUDE_PATH', ROOT); 
    } 

,並確保路徑指向地方的評論說,他們應該指向。