1我已经将所有文件上传到我使用的文件服务器000webhost.com但是我对modrewrite有一些问题我一直被重定向到http://error404.000webhost.com/? 有谁知道如何在共享区域设置cakephp 2.1?
我现在收到此错误:Fatal error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151
不确定这个错误是怎么发生的,有什么想法吗?
提前致谢。
答案 0 :(得分:2)
对,我已经弄清楚了,我按照本网站上的.htaccess说明进行操作。 http://www.000webhost.com/forum/web-programming/29628-help-cake-php-install.html 但首先我删除了所有文件并重新上传,直到我使用这个.htaccess方法后仍然无效。
希望这可以帮助其他有此问题的人。
答案 1 :(得分:1)
经过对cakephp教程的研究,在共享主机上设置cakephp,它将起作用:)
/ ** *“app”的实际目录名称。 *由Siraj编辑 * / if(!defined('APP_DIR')){define('APP_DIR',basename(dirname(dirname( FILE )))。DS。'public_html'.DS。'app');
}
/// START ---由Siraj编辑
if(!defined('CAKE_CORE_INCLUDE_PATH')){if (function_exists('ini_set')){ini_set('include_path','/ home'。DS。 '用户名' 。 DS。 'public_html'。 DS。 'lib'。 PATH_SEPARATOR。 ini_get( '的include_path')); // define('CAKE_CORE_INCLUDE_PATH','home'。 DS。 '用户名' 。 DS。 'public_html'。 DS。 'LIB'); if(!include ('/ home'。DS。'用户名'。DS。'public_html'。DS。'lib'。DS 。'蛋糕' 。 DS。 'bootstrap.php')){$ failed = true; }} else {if (!include('/ home'。DS。'username'。DS。'public_html'。DS。'lib' 。 DS。 '蛋糕' 。 DS。 'bootstrap.php')){$ failed = true; }}
////结束
RewriteEngine On RewriteCond %{REQUEST_FILENAME}!-d RewriteCond%{REQUEST_FILENAME}!-f RewriteRule ^(。*)$ index.php?url = $ 1 [QSA,L]