cakephp inside a subdirectory

前端 未结 3 394
刺人心
刺人心 2021-01-27 08:38

I have a problem with cakephp, I can\'t find a way to get cakephp working in a subdirectory. I have a webpage that resides at www.example.com and I want to have cak

3条回答
  •  逝去的感伤
    2021-01-27 09:17

    Most likely your mod_rewrite is not enable in Apache on your hosting account. Check with your host. Another possible problem described below:

    Did you change the paths in webroot/index.php?

    You need to adjust the paths in that file to point to the Cake core files folder based on your hosting providers directory path.

    For example,

    if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
        define('CAKE_CORE_INCLUDE_PATH', 'home' . DS .'w3dev' . DS . 'public_html' . DS . 'clients' . DS . 'folderName' . DS . 'remote' . DS . 'v1.1' . DS .  'cake'); 
    }
    

    And

    if (!defined('APP_DIR')) {
        define('APP_DIR', basename(dirname(dirname(__FILE__))). DS . 'v1.1' . DS . 'app'); 
    }
    

    The above all depends on your directory on your hosting server account. As your host for your root path data, so you can point it accordingly.

提交回复
热议问题