cakephp:在共享主机上配置cakephp

编程入门 行业动态 更新时间:2024-10-14 00:31:06
本文介绍了cakephp:在共享主机上配置cakephp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试在justhost上为我的addon域配置cakephp,当我访问www.merryflowers/pages/home时,我收到404未找到错误

以下是我在/webroot/index.php和/webroot/test.php中所做的更改

if(!defined('ROOT')){ define('ROOT',DS.'home'.DS.'xxx' .DS.'public_html'); } if(!define('APP_DIR')){ define('APP_DIR','merryflowers'); } if(!defined('CAKE_CORE_INCLUDE_PATH')){ define('CAKE_CORE_INCLUDE_PATH',DS.'home'.DS.'xxx'); }

我需要对.htaccess文件进行一些更改吗?以及.htaccess文件从哪个文件夹?

在public_html / merryflowers /我有:视图,插件和webroot文件夹

谢谢

解决方案

看起来 mod_rewrite 无法正常工作,我可以访问 webroot 目录(www.merryflowers/webroot/),其中指出找不到core.php 。在查看可能的 mod_rewrite 问题之前,请确保 core.php 已正确包含。

我不确定你需要设置 index.php 中的所有路径,设置 CAKE_CORE_INCLUDE_PATH 可能就足够了。

您的完整路径不是 DS.'home'.DS.'xxx',但是:

DS.'home'.DS.'xxx'。'public_html'.DS.'merryflowers'

您可能要设置 ROOT 和 APP_DIR 到默认值,除非您需要自定义路径。

I tried to configure cakephp on justhost for my addon domain and i'm getting 404 not found error when I go to www.merryflowers/pages/home

Can someone please help me out?

The following are the changes I made in /webroot/index.php and /webroot/test.php

if (!defined('ROOT')) { define('ROOT', DS.'home'.DS.'xxx'.DS.'public_html'); } if (!defined('APP_DIR')) { define('APP_DIR', 'merryflowers'); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'xxx'); }

Do I need to make some changes to the .htaccess file? and .htaccess file from which folder?

under public_html/merryflowers/ i have: views, plugins and webroot folder

thank you

解决方案

It seems mod_rewrite isn't functioning properly, I can access the webrootdirectory (www.merryflowers/webroot/), which states that core.php can't be found. Before you look into possible mod_rewrite problems, ensure core.php is properly included.

I'm not sure you need to set all the paths in index.php, setting CAKE_CORE_INCLUDE_PATH might be enough.

You're full path isn't DS.'home'.DS.'xxx', but:

DS.'home'.DS.'xxx'.'public_html'.DS.'merryflowers'

You might want to set ROOT and APP_DIR to the default values, unless you need custom paths.

更多推荐

cakephp:在共享主机上配置cakephp

本文发布于:2023-11-02 03:40:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551266.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主机   cakephp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!